The poppler module¶
Interface with popplerqt6, popplerqt6-specific classes etc.
This module depends on popplerqt6, although it can be imported when popplerqt6 is not available.
This module is no longer used, but is being kept for now as a reference for implementing the new QtPdf-based backend in pdf.py.
- class Link(linkobj)[source]¶
Bases:
Link
A Link that encapsulates a Poppler.Link object.
- property fileName¶
The file name if this is an external link.
- property isExternal¶
Indicates whether this is an external link.
- property targetPage¶
If this is an internal link, the page number to which the link should jump; otherwise -1.
- property url¶
The url the link points to.
- class PopplerPage(document, pageNumber, renderer=None)[source]¶
Bases:
AbstractRenderedPage
A Page capable of displaying one page of a Poppler.Document instance.
It has two additional instance attributes:
document: the Poppler.Document instance pageNumber: the page number to render
- classmethod loadPopplerDocument(document, renderer=None, pageSlice=None)[source]¶
Convenience class method yielding instances of this class.
The Page instances are created from the document, in page number order. The specified Renderer is used, or else the global poppler renderer. If pageSlice is given, it should be a slice object and only those pages are then loaded.
- classmethod load(filename, renderer=None)[source]¶
Load a Poppler document, and yield of instances of this class.
The filename can also be a QByteArray or a popplerqt6.Poppler.Document instance. The specified Renderer is used, or else the global poppler renderer.
- renderer = <qpageview.poppler.PopplerRenderer object>¶
- class PopplerDocument(source=None, renderer=None)[source]¶
Bases:
SingleSourceDocument
A lazily loaded Poppler (PDF) document.
- pageClass¶
alias of
PopplerPage
- class PopplerRenderer(cache=None)[source]¶
Bases:
AbstractRenderer
- renderBackend = 0¶
- printRenderBackend = 0¶
- oversampleThreshold = 96¶
- render(page, key, tile, paperColor=None)[source]¶
Generate an image for the Page referred to by key.
- setup(doc, backend=None, paperColor=None)[source]¶
Use the poppler document in context, properly configured and locked.