You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2007/07/10 14:05:25 UTC

DO NOT REPLY [Bug 42845] New: - Printing error. Prints charater+1.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42845>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42845

           Summary: Printing error. Prints charater+1.
           Product: Fop
           Version: 0.20.5
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: pdf
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: richardtrans@sol.dk


When we print pdf files made by fop 0.20.5 we sometimes get it printet wrong.
All characters get replaced by the character ascii value +1.
Example:
156 is printet as 267
AFL is printet as BGM

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42845] - Printing error. Prints charater+1.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42845>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42845





------- Additional Comments From ulrich.scheper@basler.co.at  2008-01-10 03:36 -------
Problem still exitsts within current version 0.94.

See some more hints to the problem...

This is a mis-feature of (some?) Windows print drivers. They: 
1) send font sub-sets to the printer, but, rather than sending the characters 
with their proper encoding, use a custom encoding that allocates codes in order 
of appearence - not sending the proper codes is a bug and will break the 
document for use on the Palm. 

2) if there is a font substitution available for the printer, they may then 
fail to actually use (or even send?) the font subset and try and use the 
substituted font in its proper encoding for the bogus encoding created in 
producing the subset

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42845] - Printing error. Prints charater+1.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42845>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42845





------- Additional Comments From ulrich.scheper@basler.co.at  2008-01-16 00:03 -------
I got some mor information today. It seems as if the problem mainly occurs 
under the following circumstances:
1) XML is generated
2) XML is transformed using XSL-FO and FOP called via JavaScript
3) immediately after the transformation the PDF is shown using a JavaScript-Call
4) if you print now the error may occur

Is it possible that on a slow machine, the pdf file is not completely written 
(buffer not completely emptied) while the FOP process signals the system it is 
ready and now acrobat opens a file where e.g. some crucial font information at 
the end of the file is not available, yet? When you open the file a second time 
the file is complete and therefore one can print it...

I know the description above sounds quite unlikely but if one takes into 
account that the problem occurs quite rarely and is not reproducable with the 
same generated document, maybe its possible.

The source for step two and three is attached below.


The source for step 2 and 3:
// create an ActiveXObject and declare some general stuff
var aShell = new ActiveXObject("WScript.Shell");

var sPathRoot  = window.top.BTMDB.RootURL + "pdf";
var sPathFOP   = sPathRoot + "\\fop";
var sPathJava  = window.top.BTMDB.RootURL  + "\\jre\\jre1.6.0_03\\bin\\java";
var sPathBuild = sPathFOP  + "\\build";
var sPathLib   = sPathFOP  + "\\lib";

// transform file to PDF
var arg = "\"" + sPathJava + "\" ";
arg    += "-cp \"";
arg    += sPathBuild + "\\fop.jar;";
arg    += sPathLib + "\\xml-apis.jar;";
arg    += sPathLib + "\\xercesImpl.jar;";
arg    += sPathLib + "\\xalan.jar;";
arg    += sPathLib + "\\serializer.jar;";
arg    += sPathLib + "\\batik-all.jar;";
arg    += sPathLib + "\\xmlgraphics-commons.jar;";
arg    += sPathLib + "\\avalon-framework.jar;";
arg    += sPathLib + "\\commons-io.jar;";
arg    += sPathLib + "\\commons-logging.jar;\" ";
arg    += "org.apache.fop.cli.Main ";
arg    += "-xml " + sXmlUrl + " ";
arg    += "-xsl " + sXslUrl + " ";
arg    += "-pdf " + sPdfUrl + " ";
arg    += "-nocopy " + " ";
arg    += "-noedit " + " ";
arg    += "-noannotations";

// run (<application & params>, <[0|1] - process in background|foreground>, 
// <[true|false] wait till finished>
var nEcode = aShell.Run (arg, 0, true);

if (nEcode != 0)
{
  alert ("[ErrPDF-01]\nError while transforming. Send file:\n-> " + sXmlUrl 
+ "")
  window.top.TransferToCCA9 (sXmlUrl);
  return;
}

// show result
if (bShowPdf)
{
  var arg = "cmd /c \"" + sPdfUrl;

  // run (<application & params>, <[0|1] - process in background|foreground>, 
  // <[true|false] wait till finished>
  aShell.Run (arg, 0, false);
}


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42845] - Printing error. Prints charater+1.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42845>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42845





------- Additional Comments From ulrich.scheper@basler.co.at  2008-01-14 07:29 -------
Hi!
Well, due to the fact that the problem occurs only very arbitrary the problem 
might affect a bigger number of people than you think. But nevertheless the 
problem is discussed in sseveral other groups. To give you an idea here some 
links

http://www.adobeforums.com/webx/.3bbeb93b -> this content has been extracted by 
myself
http://www.adobeforums.com/webx/.3bc3a663
http://www.adobeforums.com/webx/.3bc2f70f

http://www.hostingforum.ca/156897-garbled-output-character-shift-adobe-pdfs-via-
citrix.html

Of course it is not possible for me to rule out third party issues. All I can 
say is that the problem occurs only with documents generated by FOP. And I 
aggree as long as there is no way of reproducing the problem, it is quite hart 
(or maybe impossible) to track down the problem. Nevertheless in my opinion you 
should not ignore this error. Maybe there is a problem with the font 
identification mechanism inside the generated PDF documents.

(In reply to comment #4)
> Unless you take the necessary steps to rule out the third-party APIs for being
> responsible for this and you supply concrete examples (or a guide) to 
reproduce
> the problem, there's really nothing we can do. There are most probably a lot 
of
> variables in here that we don't know of.
> You say it works with some printer drivers and not with others. That's an
> indication that FOP is not at fault. Furthermore: so many people are printing
> FOP-generated PDFs with Acrobat and don't have problems. You'd have to look 
more
> towards the end of the processing chain, i.e. between Acrobat and the 
operating
> system, where we can't help you. Unfortunately, Adobe usually leaves you in 
the
> rain when you run into problems and printer drivers are often the source of
> problems in that area.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42845] - Printing error. Prints charater+1.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42845>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42845





------- Additional Comments From jeremias@apache.org  2008-01-16 00:24 -------
(In reply to comment #8)
<snip/>
> Is it possible that on a slow machine, the pdf file is not completely written 
> (buffer not completely emptied) while the FOP process signals the system it is 
> ready and now acrobat opens a file where e.g. some crucial font information at 
> the end of the file is not available, yet? When you open the file a second time 
> the file is complete and therefore one can print it...
<snip/> 

That would mean that the aShell.Run command returns before the Java process has
completely finished. At any rate, the output file is properly finalized and
closed by FOP (I've checked). So, no, I can't imagine that there are still any
open buffers or something like that around (except in a faulty operating system
which would be a catastrophe and not affect only one program). Furthermore,
Acrobat usually notifies me if I want to open a PDF that is incomplete/corrupt.
I still believe in a bug in Acrobat but I could be wrong. Have you tried a
different PDF viewer? I know using Acrobat could be company policy but just in
order to narrow down the problem such an experiment could be worthwhile.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Re: DO NOT REPLY [Bug 42845] - Printing error. Prints charater+1.

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi Chris,

I fully agree with you. Moreover I think the website refactoring should
be done when releasing FOP 0.94, and that's where I call for help. We
would remove the 0.20.5 tab and replace it with a "upgrading from
earlier versions" section.
Once 0.94 is out we would remove the 0.20.5 entry from Bugzilla.
As to the conformance page, I think we could remove the 0.20.5 column as
well. When I have a look at it it gives me the feeling that 0.93 isn't
that life-changing compared to 0.20.5, whereas I think it is...

Vincent


Chris Bowditch a écrit :
> bugzilla@apache.org wrote:
> 
>> ------- Additional Comments From a_l.delmelle@pandora.be  2007-07-10
>> 09:34 -------
>>
>> Apologies, but bugs in FOP 0.20.5 will no longer be fixed. Please try
>> FOP 0.93 or the Trunk, and see if the problem persists there.
>>
> 
> Hi Andreas,
> 
> I notice you closing a few 0.20.5 bugs and completely agree that we
> shouldn't be spending time looking at these issues any more. The trouble
> is people keep using 0.20.5 and raising bugs against it because our
> website gives the impressive 0.20.5 is still a supported product, an
> alternative to 0.93 rather than 0.93 being a replacement for 0.20.5. The
> is confirmed by the fact the website has separate tabs for 0.20.5 and 0.93.
> 
> If we are serious about no longer supporting 0.20.5, which I think we
> should be after nearly 2 years of 0.9x releases then I think we should
> seriously consider refactoring the website slightly to get the point
> across. Indeed to save us the bother of continually closing bugs against
> 0.20.5 with WONTFIX, we could remove all 0.20.x entries from the
> bugzilla version list ;)
> 
> In terms of refactoring the website I think the tab titled 0.20.5 should
> contain the page how to upgrade from previous versions, instead of
> documentation on how to configure 0.20.5 etc. Then it is totally clear
> that 0.20.5 is no longer a supported product and if folk choose to
> continue to use it then they must support it themselves instead of
> bombarding us with problems with relating to it.
> 
> I am not so sure if 0.20.5 should be removed from the compliance page
> yet but we should also consider removing the binaries from the download
> area. That will discourage any new users starting to use it instead of
> the active 0.9x release, which they may well do in error at the moment
> because of the website showing 0.20.5 and 0.93 side by side.
> 
> WDYT?
> 
> Chris
> 
> 

Re: DO NOT REPLY [Bug 42845] - Printing error. Prints charater+1.

Posted by Chris Bowditch <bo...@hotmail.com>.
bugzilla@apache.org wrote:

> ------- Additional Comments From a_l.delmelle@pandora.be  2007-07-10 09:34 -------
> 
> Apologies, but bugs in FOP 0.20.5 will no longer be fixed. 
> Please try FOP 0.93 or the Trunk, and see if the problem persists there.
> 

Hi Andreas,

I notice you closing a few 0.20.5 bugs and completely agree that we 
shouldn't be spending time looking at these issues any more. The trouble 
is people keep using 0.20.5 and raising bugs against it because our 
website gives the impressive 0.20.5 is still a supported product, an 
alternative to 0.93 rather than 0.93 being a replacement for 0.20.5. The 
is confirmed by the fact the website has separate tabs for 0.20.5 and 0.93.

If we are serious about no longer supporting 0.20.5, which I think we 
should be after nearly 2 years of 0.9x releases then I think we should 
seriously consider refactoring the website slightly to get the point 
across. Indeed to save us the bother of continually closing bugs against 
0.20.5 with WONTFIX, we could remove all 0.20.x entries from the 
bugzilla version list ;)

In terms of refactoring the website I think the tab titled 0.20.5 should 
contain the page how to upgrade from previous versions, instead of 
documentation on how to configure 0.20.5 etc. Then it is totally clear 
that 0.20.5 is no longer a supported product and if folk choose to 
continue to use it then they must support it themselves instead of 
bombarding us with problems with relating to it.

I am not so sure if 0.20.5 should be removed from the compliance page 
yet but we should also consider removing the binaries from the download 
area. That will discourage any new users starting to use it instead of 
the active 0.9x release, which they may well do in error at the moment 
because of the website showing 0.20.5 and 0.93 side by side.

WDYT?

Chris



DO NOT REPLY [Bug 42845] - Printing error. Prints charater+1.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42845>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42845


a_l.delmelle@pandora.be changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Additional Comments From a_l.delmelle@pandora.be  2007-07-10 09:34 -------

Apologies, but bugs in FOP 0.20.5 will no longer be fixed. 
Please try FOP 0.93 or the Trunk, and see if the problem persists there.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42845] - Printing error. Prints charater+1.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42845>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42845





------- Additional Comments From ulrich.scheper@basler.co.at  2008-01-14 23:53 -------
The system I use is native (no VM-Ware) Windows (2000, XP, Vista) and the 
problem occurs on all three of them.

Thanks for your help.

(In reply to comment #6)
> Ulrich, the links you provided clearly indicate that the problem must be in
> Acrobat Reader (or maybe in the Acrobat Reader/Printer Driver interaction). 
If a
> PDF file displays correctly on screen but prints wrong, how can FOP be the 
cause
> of that? Furthermore, people report that opening the same file again usually
> makes the problem go away. The only thing we can potentially do in FOP is add 
an
> FAQ entry giving pointers about the problem. But otherwise, it's completely up
> to Adobe (or you switching to a different PDF viewer).
> Maybe something in FOP causes this bug in Acrobat to appear but without Adobe
> making a statement what exactly that is (if there is something in the first
> place), there's nothing we can do.
> BTW, are you in a Citrix environment? I've seen all sorts of weird behaviour
> around printing on Citrix clients in my career.
> Sorry, but I have no idea how I could help here. Let's leave this open for the
> moment. If we get more information from Adobe, maybe we can do something in
> terms of documentation.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42845] - Printing error. Prints charater+1.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42845>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42845


jeremias@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEEDINFO




------- Additional Comments From jeremias@apache.org  2008-01-10 04:43 -------
Unless you take the necessary steps to rule out the third-party APIs for being
responsible for this and you supply concrete examples (or a guide) to reproduce
the problem, there's really nothing we can do. There are most probably a lot of
variables in here that we don't know of.

You say it works with some printer drivers and not with others. That's an
indication that FOP is not at fault. Furthermore: so many people are printing
FOP-generated PDFs with Acrobat and don't have problems. You'd have to look more
towards the end of the processing chain, i.e. between Acrobat and the operating
system, where we can't help you. Unfortunately, Adobe usually leaves you in the
rain when you run into problems and printer drivers are often the source of
problems in that area.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42845] - Printing error. Prints charater+1.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42845>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42845





------- Additional Comments From jeremias@apache.org  2008-01-14 08:38 -------
Ulrich, the links you provided clearly indicate that the problem must be in
Acrobat Reader (or maybe in the Acrobat Reader/Printer Driver interaction). If a
PDF file displays correctly on screen but prints wrong, how can FOP be the cause
of that? Furthermore, people report that opening the same file again usually
makes the problem go away. The only thing we can potentially do in FOP is add an
FAQ entry giving pointers about the problem. But otherwise, it's completely up
to Adobe (or you switching to a different PDF viewer).
Maybe something in FOP causes this bug in Acrobat to appear but without Adobe
making a statement what exactly that is (if there is something in the first
place), there's nothing we can do.

BTW, are you in a Citrix environment? I've seen all sorts of weird behaviour
around printing on Citrix clients in my career.

Sorry, but I have no idea how I could help here. Let's leave this open for the
moment. If we get more information from Adobe, maybe we can do something in
terms of documentation.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 42845] - Printing error. Prints charater+1.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42845>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42845


ulrich.scheper@basler.co.at changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |
            Version|0.20.5                      |0.94




------- Additional Comments From ulrich.scheper@basler.co.at  2008-01-10 03:32 -------
I have clients that are using PDF's I write programmatically in my application. 

Now I acknowledge that this could be a problem with the third party API i use, 
but though I would see if anyone here has had this problem. 

basically they will get PDF's of orders created in a system. 

These orders will arrive one by one as email attachements. 

The administrators, in this case, will print all the orders that come in at a 
time. 

In each run 25-30% of them will print incorrectly. They appear on the screen 
exactly as they should. 

When they print the incorrect ones print with a character shift. b for a, c for 
b 

so 'Your Order' will print as 'Zpvs%Psefs'. The formatting of the text, and 
layout on the page is all as it should be. 

Now if you printed any of these documents again, they would print as they 
should. This meaning the same document, from the same email, printed again. 


Notes : 
- the problem is quite hard to reproduce : if you re-open the same file and 
print it again, or relaunch the same editing process, 
  there is no problem ! 

- the bug occurs when using PCL laser printers (mostly HP printers) 
  and Inkjet printers. 
  When using PostScript driver, it's ok. 
  (but we don't want to use PS drivers, it's slower and increase memory usage 
on the printer) 

- in the previous version of our application, 
  the silent printing system used AWT instead of Acrobat Reader, 
  at that time, there was no problem. 

- our pdf documents do not use embedded fonts.

- the problem is reproducable on old Acrobat RReader versions as well as on the 
latest.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.