<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - poppler-glib doesn't direct poppler warnings into its own error handling mechanism"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=57131">57131</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>poppler-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>poppler-glib doesn't direct poppler warnings into its own error handling mechanism
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>minor
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>uckelman@nomic.net
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>glib frontend
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>poppler
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>