This class holds a variety of information related to printers and printer device contexts.
This class is used to create a wx.PrinterDC and a wx.PostScriptDC. It is also used as a data member of wx.PrintDialogData and wx.PageSetupDialogData, as part of the mechanism for transferring data between the print dialogs and the application.
See also
Printing Framework Overview, wx.PrintDialog, wx.PageSetupDialog, wx.PrintDialogData, wx.PageSetupDialogData, PrintDialog Overview, wx.PrinterDC, wx.PostScriptDC
Default constructor. |
|
Returns the current bin (papersource). |
|
Returns |
|
Returns |
|
Returns the duplex mode. |
|
Returns the number of copies requested by the user. |
|
Gets the orientation. |
|
Returns the paper size id. |
|
Returns the printer name. |
|
Returns the current print quality. |
|
Returns |
|
Sets the current bin. |
|
Sets collation to on or off. |
|
Sets colour printing on or off. |
|
Returns the duplex mode. |
|
Sets the default number of copies to be printed out. |
|
Sets the orientation. |
|
Sets the paper id. |
|
Sets custom paper size. |
|
Sets the printer name. |
|
Sets the desired print quality. |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
Possible constructors:
PrintData() -> None
PrintData(data : PrintData) -> None
This class holds a variety of information related to printers and printer device contexts.
__init__ (self)
Default constructor.
None
__init__ (self, data : PrintData)
Copy constructor.
data (wx.PrintData)
None
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.
Returns True
if collation is on.
bool
Returns True
if colour printing is on.
bool
Returns the duplex mode.
One of wx.DUPLEX_SIMPLEX
, wx.DUPLEX_HORIZONTAL
, wx.DUPLEX_VERTICAL
.
str
Returns the number of copies requested by the user.
int
Gets the orientation.
This can be wx.LANDSCAPE
or wx.PORTRAIT
.
Returns the paper size id.
See also
Returns the printer name.
If the printer name is the empty string, it indicates that the default printer should be used.
str
Any
Returns the current print quality.
This can be a positive integer, denoting the number of dots per inch, or one of the following identifiers:
wx.PRINT_QUALITY_HIGH
wx.PRINT_QUALITY_MEDIUM
wx.PRINT_QUALITY_LOW
wx.PRINT_QUALITY_DRAFT
On input you should pass one of these identifiers, but on return you may get back a positive integer indicating the current resolution setting.
wx.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
.
bool
Sets collation to on or off.
flag (bool)
None
Sets colour printing on or off.
flag (bool)
None
Returns the duplex mode.
One of wx.DUPLEX_SIMPLEX
, wx.DUPLEX_HORIZONTAL
, wx.DUPLEX_VERTICAL
.
mode (DuplexMode)
None
filename (string)
None
Sets the default number of copies to be printed out.
n (int)
None
Sets the orientation.
This can be wx.LANDSCAPE
or wx.PORTRAIT
.
orientation (PrintOrientation)
None
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).
paperId (PaperSize)
None
See also
SetPaperSize (self, size : Size)
Sets custom paper size.
This method can be used to set up custom paper size. When using a standard size, prefer to use SetPaperId
instead.
size (wx.Size)
None
SetPaperSize (self, sz: Size)
None
Sets the printer name.
This can be the empty string to indicate that the default printer should be used.
printerName (string)
None
None
Sets the desired print quality.
This can be a positive integer, denoting the number of dots per inch, or one of the following identifiers:
wx.PRINT_QUALITY_HIGH
wx.PRINT_QUALITY_MEDIUM
wx.PRINT_QUALITY_LOW
wx.PRINT_QUALITY_DRAFT
On input you should pass one of these identifiers, but on return you may get back a positive integer indicating the current resolution setting.
quality (wx.PrintQuality)
None
int
int
See GetCollate
and SetCollate
See GetFilename
and SetFilename
See GetNoCopies
and SetNoCopies
See GetOrientation
and SetOrientation
See GetPaperId
and SetPaperId
See GetPaperSize
and SetPaperSize
See GetPrintMode
and SetPrintMode
See GetPrinterName
and SetPrinterName
See GetPrivData
and SetPrivData
See GetQuality
and SetQuality