The pdf module¶
PDF rendering backend using QtPdf.
- class Link(linkobj, index, pointSize)[source]¶
Bases:
Link
A link that encapsulates QPdfLinkModel data.
- 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 PdfPage(document, pageNumber, renderer=None)[source]¶
Bases:
AbstractRenderedPage
A Page capable of displaying one page of a QPdfDocument instance.
It has two additional instance attributes:
document: the QPdfDocument instance pageNumber: the page number to render
- classmethod loadDocument(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 QtPdf 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 PDF document, and yield of instances of this class.
The filename can also be a QByteArray or a QPdfDocument instance. The specified Renderer is used, or else the global PDF renderer.
- renderer = <qpageview.pdf.PdfRenderer object>¶
- class PdfDocument(source=None, renderer=None)[source]¶
Bases:
SingleSourceDocument
A lazily loaded PDF document.
- class PdfRenderer(cache=None)[source]¶
Bases:
AbstractRenderer
- oversampleThreshold = 96¶