I found that currently FOP outputs wrong pdf texts. --- Sample fo ------------------------------------------- <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="one"> <fo:region-body margin-top="50pt" margin-bottom="50pt" margin-left="100pt" margin-right="100pt"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="one"> <fo:flow flow-name="xsl-region-body"> <fo:block>A Block</fo:block> </fo:flow> </fo:page-sequence> </fo:root> --- End of sample fo ------------------------------------ The above simple fo is converted to the below pdf texts. BT /F1 12 Tf 0 g 0.0 Tc 1 0 0 1 100.0 732.184 Tm [(A) 0.0 Tc -278.0 (Block) ] TJ ET I think that Tc operator may not be included in TJ operator. So, FOP should outputs below pdf texts. BT /F1 12 Tf 0 g 0.0 Tc 1 0 0 1 100.0 732.184 Tm [(A) -278.0 (Block) ] TJ ET Because of this problem, the TouchUp function of Adobe Acrobat4/5 could not work. The same problem is posted at fop-user ML. Subject: TouchUp of Acrobat 4.0 From: "Philippe Pithon" <ppithon@sigal.fr> Date: 2002-04-23 10:06:56 http://marc.theaimsgroup.com/?l=fop-user&m=101955606713102&w=2 I investigated from when this problem is awake. The cause is the below commits for PDFRenderer for FOP-0.20.3 maintenance release. Subject: cvs commit: xml-fop/src/org/apache/fop/render/ps PSRenderer.java PSStream.java From: tore@apache.org Date: 2001-12-02 22:17:30 http://marc.theaimsgroup.com/?l=fop-cvs&m=100733236908296&w=2 RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java,v retrieving revision 1.91 retrieving revision 1.91.2.1 diff -u -r1.91 -r1.91.2.1 --- PDFRenderer.java 2001/09/26 12:00:42 1.91 +++ PDFRenderer.java 2001/12/02 22:17:30 1.91.2.1 @@ -548,6 +548,10 @@ addWordLines(area, rx, bl, size, areaColor); + // Set letterSpacing + float ls = area.getFontState().getLetterSpacing() / this.currentFontSize; + pdf.append(ls).append(" Tc\n"); + if (!textOpen || bl != prevWordY) { closeText(); Probably, the above code comes from the support for letter-spacing. Subject: patch: added support for letter-spacing From: Raymond Penners <raymond@duologix.nl> Date: 2001-11-29 14:59:18 http://marc.theaimsgroup.com/?l=fop-dev&m=100704585605951&w=2 Regards.
This is now fixed in CVS (I hope). TouchUp in Acrobat 4.05 works. Please test with your other tools and provide feedback.
Can you some one explain me how to solve this problem. where i need change my code?
(In reply to comment #1) > This is now fixed in CVS (I hope). TouchUp in Acrobat 4.05 works. Please test > with your other tools and provide feedback. Can you provide a link to your commit? So I'll can patch my FOP0.20.3. I cannot upgrade to 0.20.4 or 0.20.5 because all my XSLFO need to be upgraded also to get the same result.
Created attachment 17626 [details] Fixed patch for 0.20.3 This patch fix the problem for 0.20.3
Bug fixed in latest Trunk (rev 584703), and probably in all FOP 0.9x (read other comments)
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed