You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Mahmoud Kamal <ma...@itgoals.com> on 2010/06/06 13:30:07 UTC
Problem in PrintTextLocations
Dear All,
I have problem when running class PrintTextLocations in the pdfbox project
I tried using the current version of pdfbox 1.1.0 to print the location of
text in the attached pdf file but I got the following output
String[304.48706,367.96997 fs=11.04 xscale=1.0 height=5.5200005
space=2.4950402 width=5.8180847]o
String[310.36035,367.96997 fs=11.04 xscale=1.0 height=5.5200005
space=2.4950402 width=3.3671875]f
String[313.75,367.96997 fs=11.04 xscale=1.0 height=5.5200005 space=2.4950402
width=2.4950256]
String[316.27,367.96997 fs=11.04 xscale=1.0 height=5.5200005 space=2.4950402
width=5.79599]d
String[322.03287,367.96997 fs=11.04 xscale=1.0 height=5.5200005
space=2.4950402 width=2.539215]i
When trying version 0.7.3 I got the following output
String[367.39,119.89996 fs=15.96 xscale=1.0 height=7.980001 width=3.606964]
String[72.024,148.09998 fs=15.96 xscale=1.0 height=7.980001 width=3.606964]
String[72.024,180.5 fs=15.96 xscale=1.0 height=7.980001 width=16.8378]Ba
String[88.925644,180.5 fs=15.96 xscale=1.0 height=7.980001
width=16.965485]sic
String[105.95497,180.5 fs=15.96 xscale=1.0 height=7.980001 width=12.049805]
C
Another problem
When trying to PrintTextLocations of some pdf files in version 1.1.0 It cuts
the last character of work and separate it in new line like the following
output
String[431.03,352.76 fs=12.0 xscale=1.0 height=8.196 space=3.0000005
width=36.996002]Total ta
String[468.026,352.76 fs=12.0 xscale=1.0 height=8.196 space=3.0000005
width=6.0]x
String[558.75,352.76 fs=12.0 xscale=1.0 height=0.0 space=3.0000005
width=3.0]
String[531.75,352.76 fs=12.0 xscale=1.0 height=8.376 space=3.0000005
width=21.0]89.2
String[552.75,352.76 fs=12.0 xscale=1.0 height=8.424 space=3.0000005
width=6.0]5
String[561.75,352.76 fs=12.0 xscale=1.0 height=0.0 space=3.0000005
width=6.0]€
But this problem is not exists on version 0.7.3 and the output is really
great like this
String[431.03,352.76 fs=12.0 xscale=1.0 height=0.0 width=42.996002]Total tax
String[558.75,352.76 fs=12.0 xscale=1.0 height=0.0 width=3.0]
String[531.75,352.76 fs=12.0 xscale=1.0 height=0.0 width=27.0]89.25
String[561.75,352.76 fs=12.0 xscale=1.0 height=0.0 width=6.0]€
Did you have any Idea of how to fix these problems?
Thanks in advance,
Mahmoud Kamal