pypoppler shouldn't always require X11 to be running
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Poppler Python Bindings |
New
|
Undecided
|
Unassigned |
Bug Description
TL;DR: I believe the following should work when the DISPLAY environment variable is unset, but it doesn't appear to.
$ python -c 'import poppler; d=poppler.
10
$ DISPLAY= python -c 'import poppler; d=poppler.
ImportError: could not import gtk.gdk
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: '__main_
At the moment, using pypoppler to do anything useful requires X to be running - this shouldn't be a hard requirement. For example, the program pdftotext (part of poppler) doesn't require X running to extract text from PDF files -- why should pypoppler?
The knock-on effect is that AFAICS pypoppler can't currently be easily used as a server-side process to handle PDF files.
$ rpm -q python pypoppler
python-
pypoppler-