[poppler] Differing number of items returned from get_text{, layout} for glyphs over page edge
Germán Póo-Caamaño
gpoo at gnome.org
Wed Dec 4 05:53:45 PST 2013
On Wed, 2013-12-04 at 13:34 +0000, Peter Waller wrote:
> On 28 November 2013 07:22, Germán Póo-Caamaño <gpoo at gnome.org> wrote:
> FWIW, I tried to use poppler_page_get_text_layout_for_area()
> for
> implementing the text annotation markup in glib (in the demo),
> but it is
> notoriously slower than the deprecated
> poppler_page_get_selection_region().
>
> What are your timings? I tested it and see that
> poppler_page_get_text_layout_for_area and
> poppler_page_get_text_for_area are ~30% slower for emptyish pages and
> <~5% slower for more populated pages. Absolutely it is O(1ms) so
> doesn't seem a concern to me, but I'm curious what problem you're
> encountering.
For highlighting text interactively (or any other text markup), it calls
poppler_page_get_text_layout_for_area every time the selection region
changes. That is, to get the rectangles and set/update the annotation.
So, the delay is multiplied for the number of updates required.
--
Germán Poo-Caamaño
http://calcifer.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20131204/51349355/attachment.pgp>
More information about the poppler
mailing list