Contents Up Previous Next

Printer settings

NB: These routines are obsolete and should no longer be used!

The following functions are used to control PostScript printing. Under Windows, PostScript output can only be sent to a file.

Include files

<wx/dcps.h>

::wxGetPrinterCommand
::wxGetPrinterFile
::wxGetPrinterMode
::wxGetPrinterOptions
::wxGetPrinterOrientation
::wxGetPrinterPreviewCommand
::wxGetPrinterScaling
::wxGetPrinterTranslation
::wxSetPrinterCommand
::wxSetPrinterFile
::wxSetPrinterMode
::wxSetPrinterOptions
::wxSetPrinterOrientation
::wxSetPrinterPreviewCommand
::wxSetPrinterScaling
::wxSetPrinterTranslation


::wxGetPrinterCommand

wxString wxGetPrinterCommand()

Gets the printer command used to print a file. The default is lpr.


::wxGetPrinterFile

wxString wxGetPrinterFile()

Gets the PostScript output filename.


::wxGetPrinterMode

int wxGetPrinterMode()

Gets the printing mode controlling where output is sent (PS_PREVIEW, PS_FILE or PS_PRINTER). The default is PS_PREVIEW.


::wxGetPrinterOptions

wxString wxGetPrinterOptions()

Gets the additional options for the print command (e.g. specific printer). The default is nothing.


::wxGetPrinterOrientation

int wxGetPrinterOrientation()

Gets the orientation (PS_PORTRAIT or PS_LANDSCAPE). The default is PS_PORTRAIT.


::wxGetPrinterPreviewCommand

wxString wxGetPrinterPreviewCommand()

Gets the command used to view a PostScript file. The default depends on the platform.


::wxGetPrinterScaling

void wxGetPrinterScaling(float *x, float *y)

Gets the scaling factor for PostScript output. The default is 1.0, 1.0.


::wxGetPrinterTranslation

void wxGetPrinterTranslation(float *x, float *y)

Gets the translation (from the top left corner) for PostScript output. The default is 0.0, 0.0.


::wxSetPrinterCommand

void wxSetPrinterCommand(const wxString& command)

Sets the printer command used to print a file. The default is lpr.


::wxSetPrinterFile

void wxSetPrinterFile(const wxString& filename)

Sets the PostScript output filename.


::wxSetPrinterMode

void wxSetPrinterMode(int mode)

Sets the printing mode controlling where output is sent (PS_PREVIEW, PS_FILE or PS_PRINTER). The default is PS_PREVIEW.


::wxSetPrinterOptions

void wxSetPrinterOptions(const wxString& options)

Sets the additional options for the print command (e.g. specific printer). The default is nothing.


::wxSetPrinterOrientation

void wxSetPrinterOrientation(int orientation)

Sets the orientation (PS_PORTRAIT or PS_LANDSCAPE). The default is PS_PORTRAIT.


::wxSetPrinterPreviewCommand

void wxSetPrinterPreviewCommand(const wxString& command)

Sets the command used to view a PostScript file. The default depends on the platform.


::wxSetPrinterScaling

void wxSetPrinterScaling(float x, float y)

Sets the scaling factor for PostScript output. The default is 1.0, 1.0.


::wxSetPrinterTranslation

void wxSetPrinterTranslation(float x, float y)

Sets the translation (from the top left corner) for PostScript output. The default is 0.0, 0.0.