This class holds a variety of information related to printers and printer device contexts.
This class is used to create a PrinterDC and a PostScriptDC. It is also used as a data member of PrintDialogData and PageSetupDialogData, as part of the mechanism for transferring data between the print dialogs and the application.
The following functions are specific to PostScript printing and have not yet been documented:
See also
Printing Framework Overview, PrintDialog, PageSetupDialog, PrintDialogData, PageSetupDialogData, PrintDialog Overview, PrinterDC, PostScriptDC
__init__ | Default constructor. |
GetBin | Returns the current bin (papersource). |
GetCollate | Returns True if collation is on. |
GetColour | Returns True if colour printing is on. |
GetDuplex | Returns the duplex mode. |
GetFilename | |
GetNoCopies | Returns the number of copies requested by the user. |
GetOrientation | Gets the orientation. |
GetPaperId | Returns the paper size id. |
GetPrintMode | |
GetPrinterName | Returns the printer name. |
GetPrivData | |
GetQuality | Returns the current print quality. |
IsOk | Returns True if the print data is valid for using in print dialogs. |
SetBin | Sets the current bin. |
SetCollate | Sets collation to on or off. |
SetColour | Sets colour printing on or off. |
SetDuplex | Returns the duplex mode. |
SetFilename | |
SetNoCopies | Sets the default number of copies to be printed out. |
SetOrientation | Sets the orientation. |
SetPaperId | Sets the paper id. |
SetPrintMode | |
SetPrinterName | Sets the printer name. |
SetPrivData | |
SetQuality | Sets the desired print quality. |
__nonzero__ |
Bin | See GetBin and SetBin |
Collate | See GetCollate and SetCollate |
Colour | See GetColour and SetColour |
Duplex | See GetDuplex and SetDuplex |
Filename | See GetFilename and SetFilename |
NoCopies | See GetNoCopies and SetNoCopies |
Orientation | See GetOrientation and SetOrientation |
PaperId | See GetPaperId and SetPaperId |
PrintMode | See GetPrintMode and SetPrintMode |
PrinterName | See GetPrinterName and SetPrinterName |
PrivData | See GetPrivData and SetPrivData |
Quality | See GetQuality and SetQuality |
This class holds a variety of information related to printers and printer device contexts.
Possible constructors:
PrintData()
PrintData(data)
Overloaded Implementations:
__init__ (self)
Default constructor.
__init__ (self, data)
Copy constructor.
Parameters: | data (PrintData) – |
---|
Returns the current bin (papersource).
By default, the system is left to select the bin ( PRINTBIN_DEFAULT is returned).
See SetBin for the full list of bin values.
Return type: | PrintBin |
---|
Returns True if collation is on.
Return type: | bool |
---|
Returns True if colour printing is on.
Return type: | bool |
---|
Returns the duplex mode.
One of DUPLEX_SIMPLEX, DUPLEX_HORIZONTAL, DUPLEX_VERTICAL.
Return type: | DuplexMode |
---|
Return type: | string |
---|
Returns the number of copies requested by the user.
Return type: | int |
---|
Gets the orientation.
This can be LANDSCAPE or PORTRAIT.
Return type: | PrintOrientation |
---|
Returns the printer name.
If the printer name is the empty string, it indicates that the default printer should be used.
Return type: | string |
---|
Return type: | PyObject |
---|
Returns the current print quality.
This can be a positive integer, denoting the number of dots per inch, or one of the following identifiers:
On input you should pass one of these identifiers, but on return you may get back a positive integer indicating the current resolution setting.
Return type: | PrintQuality |
---|
Returns True if the print data is valid for using in print dialogs.
This can return False on Windows if the current printer is not set, for example. On all other platforms, it returns True.
Return type: | bool |
---|
Sets collation to on or off.
Parameters: | flag (bool) – |
---|
Sets colour printing on or off.
Parameters: | flag (bool) – |
---|
Returns the duplex mode.
One of DUPLEX_SIMPLEX, DUPLEX_HORIZONTAL, DUPLEX_VERTICAL.
Parameters: | mode (DuplexMode) – |
---|
Parameters: | filename (string) – |
---|
Sets the default number of copies to be printed out.
Parameters: | n (int) – |
---|
Sets the orientation.
This can be LANDSCAPE or PORTRAIT.
Parameters: | orientation (PrintOrientation) – |
---|
Sets the paper id.
This indicates the type of paper to be used. For a mapping between paper id, paper size and string name, see PrintPaperDatabase in "paper.h" (not yet documented).
Parameters: | paperId (PaperSize) – |
---|
Sets the printer name.
This can be the empty string to indicate that the default printer should be used.
Parameters: | printerName (string) – |
---|
Sets the desired print quality.
This can be a positive integer, denoting the number of dots per inch, or one of the following identifiers:
On input you should pass one of these identifiers, but on return you may get back a positive integer indicating the current resolution setting.
Parameters: | quality (PrintQuality) – |
---|
Return type: | int |
---|
See GetCollate and SetCollate
See GetFilename and SetFilename
See GetNoCopies and SetNoCopies
See GetOrientation and SetOrientation
See GetPaperId and SetPaperId
See GetPrintMode and SetPrintMode
See GetPrinterName and SetPrinterName
See GetPrivData and SetPrivData
See GetQuality and SetQuality