wPrintData

This class holds a variety of information related to printers. This class is also used to create the wPrinterDC object.

Seealso:wPrinterDC wPrintDialog wPageSetupDialog

Types

wPrintDataError = object of wError
  
An error raised when wPrntData creation failed or error occurred.
wOrientation = enum
  wPortrait = DMORIENT_PORTRAIT, wLandscape = DMORIENT_LANDSCAPE
wDuplexMode = enum
  wDuplexSimplex = DMDUP_SIMPLEX, wDuplexVertical = DMDUP_VERTICAL,
  wDuplexHorizontal = DMDUP_HORIZONTAL
wPaper = enum
  wPaperLetter = DMPAPER_LETTER, wPaperLetterSmall = DMPAPER_LETTERSMALL,
  wPaperTabloid = DMPAPER_TABLOID, wPaperLedger = DMPAPER_LEDGER,
  wPaperLegal = DMPAPER_LEGAL, wPaperStatement = DMPAPER_STATEMENT,
  wPaperExecutive = DMPAPER_EXECUTIVE, wPaperA3 = DMPAPER_A3, wPaperA4 = DMPAPER_A4,
  wPaperA4Small = DMPAPER_A4SMALL, wPaperA5 = DMPAPER_A5, wPaperB4 = DMPAPER_B4,
  wPaperB5 = DMPAPER_B5, wPaperFolio = DMPAPER_FOLIO, wPaperQuarto = DMPAPER_QUARTO,
  wPaper10x14 = DMPAPER_10X14, wPaper11x17 = DMPAPER_11X17, wPaperNote = DMPAPER_NOTE,
  wPaperEnv9 = DMPAPER_ENV_9, wPaperEnv10 = DMPAPER_ENV_10,
  wPaperEnv11 = DMPAPER_ENV_11, wPaperEnv12 = DMPAPER_ENV_12,
  wPaperEnv14 = DMPAPER_ENV_14, wPaperCSheet = DMPAPER_CSHEET,
  wPaperDSheet = DMPAPER_DSHEET, wPaperESheet = DMPAPER_ESHEET,
  wPaperEnvDl = DMPAPER_ENV_DL, wPaperEnvC5 = DMPAPER_ENV_C5,
  wPaperEnvC3 = DMPAPER_ENV_C3, wPaperEnvC4 = DMPAPER_ENV_C4,
  wPaperEnvC6 = DMPAPER_ENV_C6, wPaperEnvC65 = DMPAPER_ENV_C65,
  wPaperEnvB4 = DMPAPER_ENV_B4, wPaperEnvB5 = DMPAPER_ENV_B5,
  wPaperEnvB6 = DMPAPER_ENV_B6, wPaperEnvItaly = DMPAPER_ENV_ITALY,
  wPaperEnvMonarch = DMPAPER_ENV_MONARCH, wPaperEnvPersonal = DMPAPER_ENV_PERSONAL,
  wPaperFanfoldUs = DMPAPER_FANFOLD_US,
  wPaperFanfoldStdGerman = DMPAPER_FANFOLD_STD_GERMAN,
  wPaperFanfoldLglGerman = DMPAPER_FANFOLD_LGL_GERMAN,
  wPaperIsoB4 = DMPAPER_ISO_B4, wPaperJapanesePostcard = DMPAPER_JAPANESE_POSTCARD,
  wPaper9x11 = DMPAPER_9X11, wPaper10x11 = DMPAPER_10X11, wPaper15x11 = DMPAPER_15X11,
  wPaperEnvInvite = DMPAPER_ENV_INVITE, wPaperReserved48 = DMPAPER_RESERVED_48,
  wPaperReserved49 = DMPAPER_RESERVED_49, wPaperLetterExtra = DMPAPER_LETTER_EXTRA,
  wPaperLegalExtra = DMPAPER_LEGAL_EXTRA,
  wPaperTabloidExtra = DMPAPER_TABLOID_EXTRA, wPaperA4Extra = DMPAPER_A4_EXTRA,
  wPaperLetterTransverse = DMPAPER_LETTER_TRANSVERSE,
  wPaperA4Transverse = DMPAPER_A4_TRANSVERSE,
  wPaperLetterExtraTransverse = DMPAPER_LETTER_EXTRA_TRANSVERSE,
  wPaperAPlus = DMPAPER_A_PLUS, wPaperBPlus = DMPAPER_B_PLUS,
  wPaperLetterPlus = DMPAPER_LETTER_PLUS, wPaperA4Plus = DMPAPER_A4_PLUS,
  wPaperA5Transverse = DMPAPER_A5_TRANSVERSE,
  wPaperB5Transverse = DMPAPER_B5_TRANSVERSE, wPaperA3Extra = DMPAPER_A3_EXTRA,
  wPaperA5Extra = DMPAPER_A5_EXTRA, wPaperB5Extra = DMPAPER_B5_EXTRA,
  wPaperA2 = DMPAPER_A2, wPaperA3Transverse = DMPAPER_A3_TRANSVERSE,
  wPaperA3ExtraTransverse = DMPAPER_A3_EXTRA_TRANSVERSE,
  wPaperDblJapanesePostcard = DMPAPER_DBL_JAPANESE_POSTCARD, wPaperA6 = DMPAPER_A6,
  wPaperJenvKaku2 = DMPAPER_JENV_KAKU2, wPaperJenvKaku3 = DMPAPER_JENV_KAKU3,
  wPaperJenvChou3 = DMPAPER_JENV_CHOU3, wPaperJenvChou4 = DMPAPER_JENV_CHOU4,
  wPaperLetterRotated = DMPAPER_LETTER_ROTATED,
  wPaperA3Rotated = DMPAPER_A3_ROTATED, wPaperA4Rotated = DMPAPER_A4_ROTATED,
  wPaperA5Rotated = DMPAPER_A5_ROTATED,
  wPaperB4JisRotated = DMPAPER_B4_JIS_ROTATED,
  wPaperB5JisRotated = DMPAPER_B5_JIS_ROTATED,
  wPaperJapanesePostcardRotated = DMPAPER_JAPANESE_POSTCARD_ROTATED,
  wPaperDblJapanesePostcardRotated = DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED,
  wPaperA6Rotated = DMPAPER_A6_ROTATED,
  wPaperJenvKaku2Rotated = DMPAPER_JENV_KAKU2_ROTATED,
  wPaperJenvKaku3Rotated = DMPAPER_JENV_KAKU3_ROTATED,
  wPaperJenvChou3Rotated = DMPAPER_JENV_CHOU3_ROTATED,
  wPaperJenvChou4Rotated = DMPAPER_JENV_CHOU4_ROTATED,
  wPaperB6Jis = DMPAPER_B6_JIS, wPaperB6JisRotated = DMPAPER_B6_JIS_ROTATED,
  wPaper12x11 = DMPAPER_12X11, wPaperJenvYou4 = DMPAPER_JENV_YOU4,
  wPaperJenvYou4Rotated = DMPAPER_JENV_YOU4_ROTATED, wPaperP16k = DMPAPER_P16K,
  wPaperP32k = DMPAPER_P32K, wPaperP32kBig = DMPAPER_P32KBIG,
  wPaperPenv1 = DMPAPER_PENV_1, wPaperPenv2 = DMPAPER_PENV_2,
  wPaperPenv3 = DMPAPER_PENV_3, wPaperPenv4 = DMPAPER_PENV_4,
  wPaperPenv5 = DMPAPER_PENV_5, wPaperPenv6 = DMPAPER_PENV_6,
  wPaperPenv7 = DMPAPER_PENV_7, wPaperPenv8 = DMPAPER_PENV_8,
  wPaperPenv9 = DMPAPER_PENV_9, wPaperPenv10 = DMPAPER_PENV_10,
  wPaperP16kRotated = DMPAPER_P16K_ROTATED,
  wPaperP32kRotated = DMPAPER_P32K_ROTATED,
  wPaperP32kBigRotated = DMPAPER_P32KBIG_ROTATED,
  wPaperPenv1Rotated = DMPAPER_PENV_1_ROTATED,
  wPaperPenv2Rotated = DMPAPER_PENV_2_ROTATED,
  wPaperPenv3Rotated = DMPAPER_PENV_3_ROTATED,
  wPaperPenv4Rotated = DMPAPER_PENV_4_ROTATED,
  wPaperPenv5Rotated = DMPAPER_PENV_5_ROTATED,
  wPaperPenv6Rotated = DMPAPER_PENV_6_ROTATED,
  wPaperPenv7Rotated = DMPAPER_PENV_7_ROTATED,
  wPaperPenv8Rotated = DMPAPER_PENV_8_ROTATED,
  wPaperPenv9Rotated = DMPAPER_PENV_9_ROTATED,
  wPaperPenv10Rotated = DMPAPER_PENV_10_ROTATED, wPaperUser = DMPAPER_USER

Procs

proc init(self: wPrintData; hDevMode: HGLOBAL; hDevNames: HGLOBAL) {...}{.raises: [], tags: [].}
Initializer by hDevMode and hDevNames, for internal use only.
proc PrintData(hDevMode: HGLOBAL; hDevNames: HGLOBAL): wPrintData {...}{.inline,
    discardable, raises: [], tags: [].}
Constructor.
proc init(self: wPrintData; device: string; devMode: string) {...}{.raises: [], tags: [].}
Initializer by devMode and device name, for internal use only.
proc PrintData(device: string; devMode: string): wPrintData {...}{.inline, discardable,
    raises: [], tags: [].}
Constructor.
proc init(self: wPrintData) {...}{.inline, raises: [wPrintDataError], tags: [RootEffect].}
Initializes the data by default printer.
proc PrintData(): wPrintData {...}{.inline, discardable, raises: [wPrintDataError],
                            tags: [RootEffect].}
Constructor.
proc init(self: wPrintData; device: string) {...}{.raises: [wPrintDataError], tags: [].}
Initializes the data by specific printer.
proc PrintData(device: string): wPrintData {...}{.inline, discardable,
    raises: [wPrintDataError], tags: [].}
Constructor.
proc init(self: wPrintData; printData: wPrintData) {...}{.raises: [], tags: [].}
Initializer by wPrintData object, aka. copy.
proc PrintData(printData: wPrintData): wPrintData {...}{.inline, discardable, raises: [],
    tags: [].}
Constructor.
proc isOk(self: wPrintData): bool {...}{.inline, raises: [], tags: [].}
Returns true if the print data is valid for using in print dialogs.
proc getDevice(self: wPrintData): string {...}{.inline, raises: [], tags: [].}
Returns the device name.
proc getPrinterName(self: wPrintData): string {...}{.inline, raises: [], tags: [].}
Returns the printer name. The same as getDevice().
proc getPaper(self: wPrintData): wPaper {...}{.inline, raises: [], tags: [].}
Returns the paper kind.
proc getPaperName(self: wPrintData): string {...}{.inline, raises: [], tags: [].}
Returns the paper name, if any.
proc getPaperSize(self: wPrintData): wSize {...}{.inline, raises: [], tags: [].}
Returns the paper size, in millimetres.
proc getOrientation(self: wPrintData): wOrientation {...}{.inline, raises: [], tags: [].}
Gets the orientation.
proc getCopies(self: wPrintData): int {...}{.inline, raises: [], tags: [].}
Returns the number of copies.
proc getCollate(self: wPrintData): bool {...}{.inline, raises: [], tags: [].}
Returns true if collation is on.
proc getColor(self: wPrintData): bool {...}{.inline, raises: [], tags: [].}
Returns true if colour printing is on.
proc getDuplex(self: wPrintData): wDuplexMode {...}{.inline, raises: [], tags: [].}
Returns the duplex mode.
proc setPaper(self: wPrintData; paper: wPaper) {...}{.inline, raises: [], tags: [].}
Sets the paper kind.
proc setPaperSize(self: wPrintData; size: wSize) {...}{.inline, raises: [], tags: [].}
Sets the custom paper size, in millimetres.
proc setOrientation(self: wPrintData; orientation: wOrientation) {...}{.inline, raises: [],
    tags: [].}
Sets the orientation. This can be wLandscape or wPortrait.
proc setCopies(self: wPrintData; copies: int) {...}{.inline, raises: [], tags: [].}
Sets the copies.
proc setColor(self: wPrintData; flag: bool) {...}{.inline, raises: [], tags: [].}
Sets color printing on or off.
proc setDuplex(self: wPrintData; mode: wDuplexMode) {...}{.inline, raises: [], tags: [].}
Sets the duplex mode. This can be wDuplexSimplex, wDuplexVertical, or wDuplexHorizontal.