Do you have an example py-poppler-qt?

I am developing an application in PyQt4 that ultimately should open and show PDF files. There is a python library for this task: python-poppler (in different spellings).

The problem is that it is terribly documented, and the only simple working example that I have found so far is using Python + Gtk + Cairo, and the Python + Qt example that I have found uses an older version of the library and many major changes have occurred since then, so it no longer works. For a week, I have been trying to use the code in the PyGtk example to crack the PyQt code, but so far have not been successful.

Has anyone got a simple example of a Python-Qt program that opens and displays a PDF file that may be useful to the community to learn how to work with this library?

Many thanks.

Archive with a broken pyqt example

Archive with a working PyGtk example

+4
source share
1 answer

There is an example buried deep in the experimental (unused) application branch, here is a link to a specific file containing the code. I don’t know if this will help? All relevant Poppler code itself is contained within the PdfViewer class at the bottom of this file.

http://bazaar.launchpad.net/~j-corwin/openlp/pdf/annotate/head:/openlp/plugins/presentations/lib/pdfcontroller.py

+5
source

Source: https://habr.com/ru/post/1304987/


All Articles