[Poppler-bugs] [Bug 26077] Mis-placed ActualText strings
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Jan 23 05:58:24 PST 2010
http://bugs.freedesktop.org/show_bug.cgi?id=26077
--- Comment #6 from Adrian Johnson <ajohnson at redneon.com> 2010-01-23 05:58:23 PST ---
It works fine using "pdftotext -raw" but without "-raw" it fails. The asterism
is drawn using 3 asterisks. Adding the following debug statements:
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -4518,8 +4518,10 @@ void ActualText::addChar(GfxState *state, double x,
double y,
double dx, double dy,
CharCode c, int nBytes, Unicode *u, int uLen) {
if (actualTextBMCLevel == 0) {
+ printf("addChar %f %f %f %f '%c'\n", x, y, dx, dy, c);
text->addChar(state, x, y, dx, dy, c, nBytes, u, uLen);
} else {
+ printf("actualText %f %f %f %f '%c'\n", x, y, dx, dy, c);
// Inside ActualText span.
I get the output:
addChar 76.710000 -62.760000 7.195279 0.000000 'T'
addChar 83.905279 -62.760000 5.535443 0.000000 'h'
addChar 89.440721 -62.760000 2.767721 0.000000 'i'
addChar 92.208443 -62.760000 3.929407 0.000000 's'
actualText 102.450000 -61.920000 4.981500 0.000000 '*'
actualText 99.460000 -66.400000 4.981500 0.000000 '*'
actualText 105.437800 -66.400000 4.981500 0.000000 '*'
addChar 113.740000 -62.760000 2.767721 0.000000 'i'
addChar 116.507721 -62.760000 3.929407 0.000000 's'
addChar 123.754808 -62.760000 4.981500 0.000000 'a'
addChar 128.736308 -62.760000 5.535443 0.000000 'n'
addChar 137.589429 -62.760000 4.981500 0.000000 'a'
addChar 142.570929 -62.760000 3.929407 0.000000 's'
addChar 146.500337 -62.760000 3.874611 0.000000 't'
addChar 150.374947 -62.760000 4.427557 0.000000 'e'
addChar 154.802505 -62.760000 3.902507 0.000000 'r'
addChar 158.705012 -62.760000 2.767721 0.000000 'i'
addChar 161.472733 -62.760000 3.929407 0.000000 's'
addChar 165.402140 -62.760000 8.302168 0.000000 'm'
addChar 173.704308 -62.760000 2.767721 0.000000 '.'
addChar 231.130000 -630.640000 4.981500 0.000000 '1'
It looks like the y position of the asterisks makes TextOutputDev think the
asterisks are not on the same line.
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Poppler-bugs
mailing list