[poppler] poppler_page_find_text issues
Carlos Garcia Campos
carlosgc at gnome.org
Fri Nov 29 00:35:30 PST 2013
Paul Eggert <pweggert at yahoo.de> writes:
> Hi,
>
> 1. The Y-axis of returned rectangles seems to be inverted. Is this
> supposed to be this way? Can I safely assume this is meant to be and
> hard-code an inversion? poppler_page_get_selection does not do this,
> this function takes normal coordinates as arguments as well. It's kinda
> confusing.
I agree, unfortunately we are mixing the coordinates returned in our
API and it's confusing. The default user space in PDF sets the origin at
the lower-left corner, but the output devices can use upside-down
coordinates. In the case of TextOutputDev, that uses upside-down, I
don't understand why findText returns default user space coords, while
getSelection returns upside-down coords.
All other API, annots mapping, links, etc. uses also the PDF default
user space.
Changing that would break all existing apps, so we can't simply change
it. We can add new methods returning the same coords, and deprecate the
old ones, or we should document existing methods so that use doesn't
have to guess what to do.
> 2. The returned rectangles are not congruent with selected text. Doesn't
> look nice.
What do you mean exactly? You mean selection rectangles have a margin?
> Thanks for your support.
Thanks for reporting the issues, feel free to open bug reports in our
bugzilla.
> Regards,
> Paul
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
--
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20131129/016f7071/attachment.pgp>
More information about the poppler
mailing list