[Poppler-bugs] [Bug 57131] New: poppler-glib doesn't direct poppler warnings into its own error handling mechanism

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Nov 14 13:00:28 PST 2012


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

          Priority: medium
            Bug ID: 57131
          Assignee: poppler-bugs at lists.freedesktop.org
           Summary: poppler-glib doesn't direct poppler warnings into its
                    own error handling mechanism
          Severity: minor
    Classification: Unclassified
                OS: Linux (All)
          Reporter: uckelman at nomic.net
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: unspecified
         Component: glib frontend
           Product: poppler

If poppler_document_new_from_data() is fed a corrupt PDF, this output goes to
stderr rather than being put to the GError* passed to it:

  Error: May not be a PDF file (continuing anyway)
  Error: PDF file is damaged - attempting to reconstruct xref table...
  Error: Couldn't find trailer dictionary
  Error: Couldn't read xref table
  Error: PDF file is damaged - attempting to reconstruct xref table...

In order to stop this output from going to stderr, one must use libpoppler's
setErrorFunction() from Error.h, which is not part of the glib interface.

It would be better if either (1) the glib interface caught these warnings and
returned them in the GError*, or (2) gave some indication in the documentation
that one needs to set one's own error handler to do this.

I'm reporting this against poppler 0.18.4 on Fedora 17.

-- 
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/20121114/09e232e9/attachment.html>


More information about the Poppler-bugs mailing list