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
>>>
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 Document. new_from_ data('\ 0', 1, None) python2. 7/dist- packages/ gi/types. py", line 137, in constructor
>>> Poppler.
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/
return info.invoke(cls, *args, **kwargs)
gi._glib.GError: PDF document is damaged
>>>