************ wx.PrintData ************ Inheritance diagram for `wx.PrintData`: | .. inheritance-diagram:: wx.PrintData | Description =========== 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. .. seealso:: `wx.PrintDialog `_, `wx.PageSetupDialog `_, `wx.PrintDialogData `_, `wx.PageSetupDialogData `_, `wx.PrinterDC `_, `wx.PostScriptDC `_ Derived From ^^^^^^^^^^^^^ * `wx.Object `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetBin <#GetBin>`_ * `GetCollate <#GetCollate>`_ * `GetColour <#GetColour>`_ * `GetDuplex <#GetDuplex>`_ * `GetFilename <#GetFilename>`_ * `GetMedia <#GetMedia>`_ * `GetNoCopies <#GetNoCopies>`_ * `GetOrientation <#GetOrientation>`_ * `GetPaperId <#GetPaperId>`_ * `GetPaperSize <#GetPaperSize>`_ * `GetPrintMode <#GetPrintMode>`_ * `GetPrinterName <#GetPrinterName>`_ * `GetPrivData <#GetPrivData>`_ * `GetQuality <#GetQuality>`_ * `IsOk <#IsOk>`_ * `IsOrientationReversed <#IsOrientationReversed>`_ * `SetBin <#SetBin>`_ * `SetCollate <#SetCollate>`_ * `SetColour <#SetColour>`_ * `SetDuplex <#SetDuplex>`_ * `SetFilename <#SetFilename>`_ * `SetMedia <#SetMedia>`_ * `SetNoCopies <#SetNoCopies>`_ * `SetOrientation <#SetOrientation>`_ * `SetOrientationReversed <#SetOrientationReversed>`_ * `SetPaperId <#SetPaperId>`_ * `SetPaperSize <#SetPaperSize>`_ * `SetPrintMode <#SetPrintMode>`_ * `SetPrinterName <#SetPrinterName>`_ * `SetPrivData <#SetPrivData>`_ * `SetQuality <#SetQuality>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `Bin <#Bin>`_ * `Collate <#Collate>`_ * `Colour <#Colour>`_ * `Duplex <#Duplex>`_ * `Filename <#Filename>`_ * `NoCopies <#NoCopies>`_ * `Orientation <#Orientation>`_ * `PaperId <#PaperId>`_ * `PaperSize <#PaperSize>`_ * `PrintMode <#PrintMode>`_ * `PrinterName <#PrinterName>`_ * `PrivData <#PrivData>`_ * `Quality <#Quality>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(data) Constructors: `__init__(self)` `__init__(self, wx.PrintData data)` | **Returns:** `wx.PrintData `_ -------- .. method:: GetBin() Returns the current bin (papersource). By default, the system is left to select the bin (``wx.PRINTBIN_DEFAULT`` is returned). | **Returns:** `int` .. seealso:: `SetBin <#SetBin>`_ -------- .. method:: GetCollate() Returns ``True`` if collation is on. | **Returns:** `bool` -------- .. method:: GetColour() Returns ``True`` if colour printing is on. | **Returns:** `bool` -------- .. method:: GetDuplex() Returns the duplex mode. One of ``wx.DUPLEX_SIMPLEX``, ``wx.DUPLEX_HORIZONTAL``, ``wx.DUPLEX_VERTICAL``. | **Returns:** `int` -------- .. method:: GetFilename() `No docstrings available for this method.` -------- .. method:: GetMedia() `No docstrings available for this method.` -------- .. method:: GetNoCopies() Returns the number of copies requested by the user. | **Returns:** `int` -------- .. method:: GetOrientation() Gets the orientation. This can be ``wx.LANDSCAPE`` or ``wx.PORTRAIT``. | **Returns:** `int` -------- .. method:: GetPaperId() Returns the paper size id. | **Returns:** `int` .. seealso:: `SetPaperId <#SetPaperId>`_. -------- .. method:: GetPaperSize() `No docstrings available for this method.` -------- .. method:: GetPrintMode() `No docstrings available for this method.` -------- .. method:: GetPrinterName() Returns the printer name. If the printer name is the empty string, it indicates that the default printer should be used. | **Returns:** `string` -------- .. method:: GetPrivData() `No docstrings available for this method.` -------- .. method:: GetQuality() 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. | **Returns:** `int` -------- .. method:: IsOk() 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``. | **Returns:** `bool` -------- .. method:: IsOrientationReversed() `No docstrings available for this method.` -------- .. method:: SetBin(flag) Sets the current bin. **Parameters:** * `flag` (int): Possible values are: * ``wx.PRINTBIN_DEFAULT`` * ``wx.PRINTBIN_ONLYONE`` * ``wx.PRINTBIN_LOWER`` * ``wx.PRINTBIN_MIDDLE`` * ``wx.PRINTBIN_MANUAL`` * ``wx.PRINTBIN_ENVELOPE`` * ``wx.PRINTBIN_ENVMANUAL`` * ``wx.PRINTBIN_AUTO`` * ``wx.PRINTBIN_TRACTOR`` * ``wx.PRINTBIN_SMALLFMT`` * ``wx.PRINTBIN_LARGEFMT`` * ``wx.PRINTBIN_LARGECAPACITY`` * ``wx.PRINTBIN_CASSETTE`` * ``wx.PRINTBIN_FORMSOURCE`` * ``wx.PRINTBIN_USER`` -------- .. method:: SetCollate(flag) Sets collation to on or off. **Parameters:** * `flag` (bool) -------- .. method:: SetColour(flag) Sets colour printing on or off. **Parameters:** * `flag` (bool) -------- .. method:: SetDuplex(mode) Returns the duplex mode. One of ``wx.DUPLEX_SIMPLEX``, ``wx.DUPLEX_HORIZONTAL``, ``wx.DUPLEX_VERTICAL``. **Parameters:** * `mode` (int) -------- .. method:: SetFilename(filename) | **Parameters:** * `filename` (string) -------- .. method:: SetMedia(media) | **Parameters:** * `media` (int) -------- .. method:: SetNoCopies(n) Sets the default number of copies to be printed out. **Parameters:** * `n` (int) -------- .. method:: SetOrientation(orientation) Sets the orientation. This can be ``wx.LANDSCAPE`` or ``wx.PORTRAIT``. **Parameters:** * `orientation` (int) -------- .. method:: SetOrientationReversed(reversed) | **Parameters:** * `reversed` (bool) -------- .. method:: SetPaperId(paperId) Sets the paper id. This indicates the type of paper to be used. **Parameters:** * `paperId` (int): May have one of these values: ===================================== ======================================= Paper Id Flag Description ===================================== ======================================= ``wx.PAPER_NONE`` Use specific dimensions ``wx.PAPER_LETTER`` Letter, 8 1/2 by 11 inches ``wx.PAPER_LEGAL`` Legal, 8 1/2 by 14 inches ``wx.PAPER_A4`` A4 Sheet, 210 by 297 millimeters ``wx.PAPER_CSHEET`` C Sheet, 17 by 22 inches ``wx.PAPER_DSHEET`` D Sheet, 22 by 34 inches ``wx.PAPER_ESHEET`` E Sheet, 34 by 44 inches ``wx.PAPER_LETTERSMALL`` Letter Small, 8 1/2 by 11 inches ``wx.PAPER_TABLOID`` Tabloid, 11 by 17 inches ``wx.PAPER_LEDGER`` Ledger, 17 by 11 inches ``wx.PAPER_STATEMENT`` Statement, 5 1/2 by 8 1/2 inches ``wx.PAPER_EXECUTIVE`` Executive, 7 1/4 by 10 1/2 inches ``wx.PAPER_A3`` A3 sheet, 297 by 420 millimeters ``wx.PAPER_A4SMALL`` A4 small sheet, 210 by 297 millimeters ``wx.PAPER_A5`` A5 sheet, 148 by 210 millimeters ``wx.PAPER_B4`` B4 sheet, 250 by 354 millimeters ``wx.PAPER_B5`` B5 sheet, 182-by-257-millimeter paper ``wx.PAPER_FOLIO`` Folio, 8-1/2-by-13-inch paper ``wx.PAPER_QUARTO`` Quarto, 215-by-275-millimeter paper ``wx.PAPER_10X14`` 10-by-14-inch sheet ``wx.PAPER_11X17`` 11-by-17-inch sheet ``wx.PAPER_NOTE`` Note, 8 1/2 by 11 inches ``wx.PAPER_ENV_9`` #9 Envelope, 3 7/8 by 8 7/8 inches ``wx.PAPER_ENV_10`` #10 Envelope, 4 1/8 by 9 1/2 inches ``wx.PAPER_ENV_11`` #11 Envelope, 4 1/2 by 10 3/8 inches ``wx.PAPER_ENV_12`` #12 Envelope, 4 3/4 by 11 inches ``wx.PAPER_ENV_14`` #14 Envelope, 5 by 11 1/2 inches ``wx.PAPER_ENV_DL`` DL Envelope, 110 by 220 millimeters ``wx.PAPER_ENV_C5`` C5 Envelope, 162 by 229 millimeters ``wx.PAPER_ENV_C3`` C3 Envelope, 324 by 458 millimeters ``wx.PAPER_ENV_C4`` C4 Envelope, 229 by 324 millimeters ``wx.PAPER_ENV_C6`` C6 Envelope, 114 by 162 millimeters ``wx.PAPER_ENV_C65`` C65 Envelope, 114 by 229 millimeters ``wx.PAPER_ENV_B4`` B4 Envelope, 250 by 353 millimeters ``wx.PAPER_ENV_B5`` B5 Envelope, 176 by 250 millimeters ``wx.PAPER_ENV_B6`` B6 Envelope, 176 by 125 millimeters ``wx.PAPER_ENV_ITALY`` Italy Envelope, 110 by 230 millimeters ``wx.PAPER_ENV_MONARCH`` Monarch Envelope, 3 7/8 by 7 1/2 inches ``wx.PAPER_ENV_PERSONAL`` 6 3/4 Envelope, 3 5/8 by 6 1/2 inches ``wx.PAPER_FANFOLD_US`` US Std Fanfold, 14 7/8 by 11 inches ``wx.PAPER_FANFOLD_STD_GERMAN`` German Std Fanfold, 8 1/2 by 12 inches ``wx.PAPER_FANFOLD_LGL_GERMAN`` German Legal Fanfold, 8 1/2 by 13 inches ===================================== ======================================= | Windows 95 only: ===================================== ======================================= Paper Id Flag Description ===================================== ======================================= ``wx.PAPER_ISO_B4`` B4 (ISO) 250 x 353 mm ``wx.PAPER_JAPANESE_POSTCARD`` Japanese Postcard 100 x 148 mm ``wx.PAPER_9X11`` 9 x 11 in ``wx.PAPER_10X11`` 10 x 11 in ``wx.PAPER_15X11`` 15 x 11 in ``wx.PAPER_ENV_INVITE`` Envelope Invite 220 x 220 mm ``wx.PAPER_LETTER_EXTRA`` Letter Extra 9 \275 x 12 in ``wx.PAPER_LEGAL_EXTRA`` Legal Extra 9 \275 x 15 in ``wx.PAPER_TABLOID_EXTRA`` Tabloid Extra 11.69 x 18 in ``wx.PAPER_A4_EXTRA`` A4 Extra 9.27 x 12.69 in ``wx.PAPER_LETTER_TRANSVERSE`` Letter Transverse 8 \275 x 11 in ``wx.PAPER_A4_TRANSVERSE`` A4 Transverse 210 x 297 mm ``wx.PAPER_LETTER_EXTRA_TRANSVERSE`` Letter Extra Transverse 9\275 x 12 in ``wx.PAPER_A_PLUS`` SuperA/SuperA/A4 227 x 356 mm ``wx.PAPER_B_PLUS`` SuperB/SuperB/A3 305 x 487 mm ``wx.PAPER_LETTER_PLUS`` Letter Plus 8.5 x 12.69 in ``wx.PAPER_A4_PLUS`` A4 Plus 210 x 330 mm ``wx.PAPER_A5_TRANSVERSE`` A5 Transverse 148 x 210 mm ``wx.PAPER_B5_TRANSVERSE`` B5 (JIS) Transverse 182 x 257 mm ``wx.PAPER_A3_EXTRA`` A3 Extra 322 x 445 mm ``wx.PAPER_A5_EXTRA`` A5 Extra 174 x 235 mm ``wx.PAPER_B5_EXTRA`` B5 (ISO) Extra 201 x 276 mm ``wx.PAPER_A2`` A2 420 x 594 mm ``wx.PAPER_A3_TRANSVERSE`` A3 Transverse 297 x 420 mm ``wx.PAPER_A3_EXTRA_TRANSVERSE`` A3 Extra Transverse 322 x 445 mm ===================================== ======================================= -------- .. method:: SetPaperSize(sz) | **Parameters:** * `sz` (`wx.Size `_) -------- .. method:: SetPrintMode(printMode) | **Parameters:** * `printMode` (int) -------- .. method:: SetPrinterName(printerName) Sets the printer name. This can be the empty string to indicate that the default printer should be used. **Parameters:** * `printerName` (string) -------- .. method:: SetPrivData(data) | **Parameters:** * `data` (PyObject) -------- .. method:: SetQuality(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: 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` (int): 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`` -------- Properties ^^^^^^^^^^ .. attribute:: Bin See `GetBin <#GetBin>`_ and `SetBin <#SetBin>`_ .. attribute:: Collate See `GetCollate <#GetCollate>`_ and `SetCollate <#SetCollate>`_ .. attribute:: Colour See `GetColour <#GetColour>`_ and `SetColour <#SetColour>`_ .. attribute:: Duplex See `GetDuplex <#GetDuplex>`_ and `SetDuplex <#SetDuplex>`_ .. attribute:: Filename See `GetFilename <#GetFilename>`_ and `SetFilename <#SetFilename>`_ .. attribute:: NoCopies See `GetNoCopies <#GetNoCopies>`_ and `SetNoCopies <#SetNoCopies>`_ .. attribute:: Orientation See `GetOrientation <#GetOrientation>`_ and `SetOrientation <#SetOrientation>`_ .. attribute:: PaperId See `GetPaperId <#GetPaperId>`_ and `SetPaperId <#SetPaperId>`_ .. attribute:: PaperSize See `GetPaperSize <#GetPaperSize>`_ and `SetPaperSize <#SetPaperSize>`_ .. attribute:: PrintMode See `GetPrintMode <#GetPrintMode>`_ and `SetPrintMode <#SetPrintMode>`_ .. attribute:: PrinterName See `GetPrinterName <#GetPrinterName>`_ and `SetPrinterName <#SetPrinterName>`_ .. attribute:: PrivData See `GetPrivData <#GetPrivData>`_ and `SetPrivData <#SetPrivData>`_ .. attribute:: Quality See `GetQuality <#GetQuality>`_ and `SetQuality <#SetQuality>`_