Bug 9054 - PDF Tc Text operator BUG
Summary: PDF Tc Text operator BUG
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.20.3
Hardware: All All
: P3 major
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-14 00:37 UTC by Satoshi Ishigami
Modified: 2012-04-01 06:52 UTC (History)
2 users (show)



Attachments
Fixed patch for 0.20.3 (1.40 KB, patch)
2006-02-09 12:37 UTC, Florent Guiliani
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Satoshi Ishigami 2002-05-14 00:37:14 UTC
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.
Comment 1 Jeremias Maerki 2002-06-07 20:17:52 UTC
This is now fixed in CVS (I hope). TouchUp in Acrobat 4.05 works. Please test 
with your other tools and provide feedback.
Comment 2 Dinesh 2005-06-27 09:43:50 UTC
Can you some one explain me how to solve this problem. where i need change my 
code?
Comment 3 Florent Guiliani 2006-02-08 10:01:38 UTC
(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.
Comment 4 Florent Guiliani 2006-02-09 12:37:56 UTC
Created attachment 17626 [details]
Fixed patch for 0.20.3

This patch fix the problem for 0.20.3
Comment 5 Pascal Sancho 2007-10-23 07:26:45 UTC
Bug fixed in latest Trunk (rev 584703), and probably in all FOP 0.9x (read other
comments)
Comment 6 Glenn Adams 2012-04-01 06:52:06 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed