[Poppler-bugs] [Bug 69608] New: poppler_page_get_text() ordering does not agree with poppler_page_get_text_layout() as docs say it should

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Sep 20 07:22:04 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=69608

          Priority: medium
            Bug ID: 69608
          Assignee: poppler-bugs at lists.freedesktop.org
           Summary: poppler_page_get_text() ordering does not agree with
                    poppler_page_get_text_layout() as docs say it should
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: peter.waller at gmail.com
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: unspecified
         Component: glib frontend
           Product: poppler

Whilst trying to extract textual information from PDFs, it seems that the
documentation for poppler_page_get_text_layout() is not correct, or there is a
bug in poppler_page_get_text(). The documentation for
poppler_page_get_text_layout says:

"The position in the array represents an offset in the text returned by
poppler_page_get_text()".

(Note that the documentation says the same for
poppler_page_get_text_attributes).

However, this doesn't seem to be the case. The problem is described succinctly
here, complete with a short piece code which reproduces the problem:

http://www.mail-archive.com/poppler@lists.freedesktop.org/msg06238.html

The linked PDF [1] gives 1541 glyphs from poppler_page_get_text and 1477 glyphs
from poppler_page_get_text_layout. It does not appear to be related to unicode
encoding.

In addition to the numbers of glyphs not agreeing, the order doesn't seem to
match up either, from what I can tell.

[1] http://ww1.microchip.com/downloads/en/DeviceDoc/22197B.pdf

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20130920/6f1c40a3/attachment.html>


More information about the Poppler-bugs mailing list