The printing module

Printing facilities for qpageview.

class PrintJob(printer, pageList, parent=None)[source]

Bases: Job

Performs a print job in the background.

Emits the following signals:

progress(pageNumber, num, total)

before each Page

finished()

when done

progress

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

aborted = False
setPageList(pageList)[source]

Set the pagelist to print.

pageList may be a list of two-tuples (num, page). Otherwise, the pages are numbered from 1 in the progress message. The pages are copied.

work()[source]

Paint the pages to the printer in the background.

class PrintProgressDialog(job, parent=None)[source]

Bases: QProgressDialog

A simple progress dialog displaying the printing progress.

showProgress(page, num, total)[source]

Called by the job when printing a page.

jobFinished()[source]

Called when the print job has finished.

showErrorMessage()[source]

Reimplement to show a different or translated error message.