QPrintEngine

The QPrintEngine class defines an interface for how QPrinter interacts with a given printing subsystem. More

Inheritance diagram of PySide6.QtPrintSupport.QPrintEngine

Detailed Description

The common case when creating your own print engine is to derive from both QPaintEngine and QPrintEngine . Various properties of a print engine are given with and set with .

See also

QPaintEngine

class PySide6.QtPrintSupport.QPrintEngine
PySide6.QtPrintSupport.QPrintEngine.PrintEnginePropertyKey

This enum is used to communicate properties between the print engine and QPrinter . A property may or may not be supported by a given print engine.

Constant

Description

QPrintEngine.PPK_CollateCopies

A boolean value indicating whether the printout should be collated or not.

QPrintEngine.PPK_ColorMode

Refers to ColorMode , either color or monochrome.

QPrintEngine.PPK_Creator

A string describing the document’s creator.

QPrintEngine.PPK_Duplex

A boolean value indicating whether both sides of the printer paper should be used for the printout.

QPrintEngine.PPK_DocumentName

A string describing the document name in the spooler.

QPrintEngine.PPK_FontEmbedding

A boolean value indicating whether data for the document’s fonts should be embedded in the data sent to the printer.

QPrintEngine.PPK_FullPage

A boolean describing if the printer should be full page or not.

QPrintEngine.PPK_NumberOfCopies

Obsolete. An integer specifying the number of copies. Use instead.

QPrintEngine.PPK_Orientation

Specifies a Orientation value.

QPrintEngine.PPK_OutputFileName

The output file name as a string. An empty file name indicates that the printer should not print to a file.

QPrintEngine.PPK_PageOrder

Specifies a PageOrder value.

QPrintEngine.PPK_PageRect

A QRect specifying the page rectangle

QPrintEngine.PPK_PageSize

Obsolete. Use instead.

QPrintEngine.PPK_PaperRect

A QRect specifying the paper rectangle.

QPrintEngine.PPK_PaperSource

Specifies a PaperSource value.

QPrintEngine.PPK_PaperSources

Specifies more than one PaperSource value.

QPrintEngine.PPK_PaperName

A string specifying the name of the paper.

QPrintEngine.PPK_PaperSize

Specifies a QPrinter::PaperSize value.

QPrintEngine.PPK_PrinterName

A string specifying the name of the printer.

QPrintEngine.PPK_PrinterProgram

A string specifying the name of the printer program used for printing,

QPrintEngine.PPK_Resolution

An integer describing the dots per inch for this printer.

QPrintEngine.PPK_SelectionOption

QPrintEngine.PPK_SupportedResolutions

A list of integer QVariants describing the set of supported resolutions that the printer has.

QPrintEngine.PPK_WindowsPageSize

An integer specifying a DM_PAPER entry on Windows.

QPrintEngine.PPK_CustomPaperSize

A QSizeF specifying a custom paper size in the Point unit.

QPrintEngine.PPK_PageMargins

A QList < QVariant > containing the left, top, right and bottom margin values in the Point unit.

QPrintEngine.PPK_CopyCount

An integer specifying the number of copies to print.

QPrintEngine.PPK_SupportsMultipleCopies

A boolean value indicating whether or not the printer supports printing multiple copies in one job.

QPrintEngine.PPK_QPageSize

Set the page size using a QPageSize object.

QPrintEngine.PPK_QPageMargins

Set the page margins using a QPair of QMarginsF and Unit .

QPrintEngine.PPK_QPageLayout

Set the page layout using a QPageLayout object.

QPrintEngine.PPK_CustomBase

Basis for extension.

PySide6.QtPrintSupport.QPrintEngine.abort()
Return type

bool

PySide6.QtPrintSupport.QPrintEngine.metric(arg__1)
Parameters

arg__1PaintDeviceMetric

Return type

int

PySide6.QtPrintSupport.QPrintEngine.newPage()
Return type

bool

PySide6.QtPrintSupport.QPrintEngine.printerState()
Return type

PrinterState

PySide6.QtPrintSupport.QPrintEngine.property(key)
Parameters

keyPrintEnginePropertyKey

Return type

object

PySide6.QtPrintSupport.QPrintEngine.setProperty(key, value)
Parameters