tags:

views:

96

answers:

3

Is there a GPL or less restrictive (preferred LGPL) library to view & print PDFs?

I'm using PyQt, maybe there's a possibility to render PDFs using it?

A: 

Reportlab - http://www.reportlab.com/software/opensource/

Brendan Abel
This seems to be intended solely for generating PDFs.
Matthew Flaschen
+2  A: 

You can try python-poppler. Poppler is a well known PDF renderer (used by Okular, among other programs) based on xpdf. However, this particular binding is fairly new, and doesn't seem to have a real home page.

Matthew Flaschen
GNOME's Evince also uses libpoppler :)
badp
+1  A: 

You might want to check out this Qt Quarterly post - Poppler: Displaying PDF Files with Qt that explains how to do this in Qt. It's in C++ but I see poppler has Python bindings so it shouldn't be a problem to port the example code in the post to Python.

Idan K