I am using Poppler with the Qt 4 interface. Very occassionally when I call annotation->boundary() I get a rectangle that is completely wrong: Poppler 0.18.2 QRectF(0.478033,0.459282 0.0294118x0.0238095) QRectF(0.220649,0.284354 0.0294118x0.0238095) QRectF(0.205549,0.149167 0.33766x0.676628) ########## WRONG QRectF(0.449178,0.752604 0.0580752x0.0176349) QRectF(0.786647,0.521622 0.0154477x0.0101905) QRectF(0.508866,0.56928 0.0154477x0.0101905) Poppler 0.19.2 QRectF(0.478033,0.459282 0.0294118x0.0238095) QRectF(0.220649,0.284354 0.0294118x0.0238095) QRectF(0.205549,0.149167 0.33766x0.676628) ########## WRONG QRectF(0.449178,0.752604 0.0580752x0.0176349) QRectF(0.786647,0.521622 0.0154477x0.0101905) QRectF(0.508866,0.56928 0.0154477x0.0101905) In this case the annotation is for a deleted hyphen, so the rectangle should be very small (like the others). In a 500 page document with hundreds of annotations this bug occurs on three pages.
We'll need the pdf you have problems with.
It might be the same issue as http://lists.freedesktop.org/archives/poppler/2012-March/008944.html (i.e. wrong bbox on pdf file) If the whole file is too big, can you please extract at least the pages where it happens? pdftk origfile.pdf cat <pageNumA> <pageNumB> <pageNumC> output newfile.pdf Thank you
Created attachment 59590 [details] PDF that shows a poppler bug I have extracted just the three pages that are affected (out of 493 pages) and attached them. BTW These pages generate the following errors when viewed with evince 2.30.3: ** (evince:2523): WARNING **: Unimplemented annotation: POPPLER_ANNOT_STRIKE_OUT, please post a bug report in Evince bugzilla (http://bugzilla.gnome.org) with a testcase.
I assume that when you wrote QRectF(0.205549,0.149167 0.33766x0.676628) ########## WRONG you were referring to annotation 9870b0a1-edba-42ee-aab1-50b2fab3b996 at page 1 Type: HighlightAnnotation / StrikeOut Author: Audrey Doyle Contents: delete hyphen and close up Boundary rect: [x=0.205549 y=0.149167 w=0.33766 h=0.676628] The annotation is made of three quadrilaterals: the "-" at the top, the "28<,2" in the bottom and a third one on "<" again (it is striked out twice). So it makes sense for the bounding rect to cover that big area. You can clearly see that they are the same annotation in acroread, because clicking on one also selects the other ones, and they all show to the same popup window. If you want to extract the vertices of each quadrilateral you can use HighlightAnnotation::highlightQuads(). Please reopen this bug if there's something I'm missing.
I've reopened this bug because although I accept that is isn't a bug in the code, the method you mention and the Quad struct aren't documented clearly enough for me to use. I've read the source code for the Quad struct, but I don't understand the meaning of the QPointF points[4] array. I was expecting points[0] to be the top-left and points[2] to be the bottom-right but that seems wrong. Can you tell me what each point means please?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/447.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.