3

Im working on an Python application that can show pdf files. I tried to use the python-poppler-qt4 Binding.

So far no problem. But it is also neceseery that i can build a stand alone executable of the programm. For this I want to use PyInstaller.

It seems that PyInstaller doesnt support Poppler. How can I go around this?

User_12399
  • 113
  • 13

1 Answers1

2

What is the issue that you are hitting?

I've written quite a few programs for Windows packaged using PyInstaller using python-poppler-qt4 and the only problem I had was that the PyQt4.QtXml dependency wasn't imported automatically.

This can be fixed by creating a file named hook-popplerqt4.py with the contents:

hiddenimports = ['PyQt4.QtXml']

Save this file with the other hooks in

<PyInstaller Root>/PyInstaller/hooks

and you should be good to go.

If you're still getting issues, post your error so that we have a better idea of what the problem is.

Gary Hughes
  • 4,400
  • 1
  • 26
  • 40