Comment 16 for bug 312462

Revision history for this message
BenjaminBerg (benjamin-sipsolutions) wrote :

I would strongly suggest everyone to move to the GObject Introspection based bindings. These bindings basically make the static bindings obsolete.

Though it looks like the "array length" annotation is missing for the data input. But it does work already.

>>> from gi.repository import Poppler
>>> Poppler.Document.new_from_data('\0', 1, None)
Syntax Warning: May not be a PDF file (continuing anyway)
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Couldn't read xref table
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 137, in constructor
    return info.invoke(cls, *args, **kwargs)
gi._glib.GError: PDF document is damaged
>>>