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 |
wx.
PrintData
(Object)¶Possible constructors:
PrintData()
PrintData(data)
This class holds a variety of information related to printers and printer device contexts.
__init__
(self, *args, **kw)¶__init__ (self)
Default constructor.
__init__ (self, data)
Copy constructor.
data (wx.PrintData) –
GetBin
(self)¶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.
GetCollate
(self)¶Returns True
if collation is on.
bool
GetColour
(self)¶Returns True
if colour printing is on.
bool
GetDuplex
(self)¶Returns the duplex mode.
One of wx.DUPLEX_SIMPLEX
, wx.DUPLEX_HORIZONTAL
, wx.DUPLEX_VERTICAL
.
GetFilename
(self)¶string
GetNoCopies
(self)¶Returns the number of copies requested by the user.
int
GetOrientation
(self)¶Gets the orientation.
This can be wx.LANDSCAPE
or wx.PORTRAIT
.
GetPaperId
(self)¶Returns the paper size id.
See also
GetPrintMode
(self)¶GetPrinterName
(self)¶Returns the printer name.
If the printer name is the empty string, it indicates that the default printer should be used.
string
GetPrivData
(self)¶PyObject
GetQuality
(self)¶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
IsOk
(self)¶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
SetCollate
(self, flag)¶Sets collation to on or off.
flag (bool) –
SetColour
(self, flag)¶Sets colour printing on or off.
flag (bool) –
SetDuplex
(self, mode)¶Returns the duplex mode.
One of wx.DUPLEX_SIMPLEX
, wx.DUPLEX_HORIZONTAL
, wx.DUPLEX_VERTICAL
.
mode (DuplexMode) –
SetFilename
(self, filename)¶filename (string) –
SetNoCopies
(self, n)¶Sets the default number of copies to be printed out.
n (int) –
SetOrientation
(self, orientation)¶Sets the orientation.
This can be wx.LANDSCAPE
or wx.PORTRAIT
.
orientation (PrintOrientation) –
SetPaperId
(self, paperId)¶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) –
See also
SetPaperSize
(self, *args, **kw)¶SetPaperSize (self, 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) –
SetPaperSize (self, sz)
SetPrinterName
(self, printerName)¶Sets the printer name.
This can be the empty string to indicate that the default printer should be used.
printerName (string) –
SetPrivData
(self, data)¶SetQuality
(self, quality)¶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) –
__bool__
(self)¶int
__nonzero__
(self)¶int
Collate
¶See GetCollate
and SetCollate
Filename
¶See GetFilename
and SetFilename
NoCopies
¶See GetNoCopies
and SetNoCopies
Orientation
¶See GetOrientation
and SetOrientation
PaperId
¶See GetPaperId
and SetPaperId
PaperSize
¶See GetPaperSize
and SetPaperSize
PrintMode
¶See GetPrintMode
and SetPrintMode
PrinterName
¶See GetPrinterName
and SetPrinterName
PrivData
¶See GetPrivData
and SetPrivData
Quality
¶See GetQuality
and SetQuality