PRTINFO( ) Function

Returns the current specified printer setting.

PRTINFO(nPrinterSetting [, cPrinterName])

Return Values

Numeric

Parameters

  • nPrinterSetting
    Specifies which Visual FoxPro printer setting is returned.

    The following tables list the printer setting return values.

    Note   If PRTINFO(2) returns – 1 or a value other than those listed in the table below, use PRTINFO(3) and PRTINFO(4) to return the paper size.

    If nPrinterSetting equals 1 (PRT_ORIENTATION in FOXPRO.H), PRTINFO( ) returns the paper orientation:

    Return values Setting
    –1 Information not available
    0 Portrait
    1 Landscape

    If nPrinterSetting equals 2 (PRT_PAPERSIZE in FOXPRO.H), PRTINFO( ) returns the paper size:

    Return values Setting
    –1 or a value other than those listed below Information not available. Use nPrinterSetting = 3 and nPrinterSetting = 4 to determine the paper size.
    1 Letter, 8 1/2 x 11 in
    2 Letter Small, 8 1/2 x 11 in
    3 Tabloid, 11 x 17 in
    4 Ledger, 17 x 11 in
    5 Legal, 8 1/2 x 14 in
    6 Statement, 5 1/2 x 8 1/2 in
    7 Executive, 7 1/4 x 10 1/2 in
    8 A3, 297 x 420 mm
    9 A4, 210 x 297 mm
    10 A4, Small 210 x 297 mm
    11 A5, 148 x 210 mm
    12 B4, 250 x 354 mm
    13 B5, 182 x 257 mm
    14 Folio, 8 1/2 x 13 in
    15 Quarto, 215 x 275 mm
    16 10 x 14 in
    17 11 x 17 in
    18 Note, 8 1/2 x 11 in
    19 Envelope #9, 3 7/8 x 8 7/8 in
    20 Envelope #10, 4 1/8 x 9 1/2 in
    21 Envelope #11, 4 1/2 x 10 3/8 in
    22 Envelope #12, 4 1/2 x 11 in
    23 Envelope #14, 5 x 11 1/2 in
    24 C size sheet
    25 D size sheet
    26 E size sheet
    27 Envelope DL, 110 x 220 mm
    28 Envelope C5, 162 x 229 mm
    29 Envelope C3, 324 x 458 mm
    30 Envelope C4, 229 x 324 mm
    31 Envelope C6, 114 x 162 mm
    32 Envelope C65, 114 x 229 mm
    33 Envelope B4, 250 x 353 mm
    34 Envelope B5, 176 x 250 mm
    35 Envelope B6, 176 x 125 mm
    36 Envelope, 110 x 230 mm
    37 Envelope Monarch, 3 7/8 x 7.5 in
    38 6 3/4 Envelope, 3 5/8 x 6 1/2 in
    39 US Std Fanfold, 14 7/8 x 11 in
    40 German Std Fanfold, 8 1/2 x 12 in
    41 German Legal Fanfold, 8 1/2 x 13 in

    If nPrinterSetting equals 3 (PRT_PAPERLENGTH in FOXPRO.H), PRTINFO( ) returns the paper length in .1mm increments.

    If nPrinterSetting equals 4 (PRT_PAPERWIDTH in FOXPRO.H), PRTINFO( ) returns the paper width in .1mm increments.

    If nPrinterSetting equals 5 (PRT_SCALE in FOXPRO.H), PRTINFO( ) returns the factor by which printed output is scaled.

    If nPrinterSetting equals 6 (PRT_COPIES in FOXPRO.H), PRTINFO( ) returns the number of copies to print.

    If nPrinterSetting equals 7 (PRT_DEFASOURCE in FOXPRO.H), PRTINFO( ) returns the default paper source:

    Return values Setting
    1 Upper bin
    2 Lower bin
    3 Middle bin
    4 Manual feed
    5 Envelope bin
    6 Manual feed envelope
    7 Auto select
    8 Tractor feed
    9 Small format
    10 Large format
    11 Large capacity
    14 Cassette

    If nPrinterSetting equals 8 (PRT_PRINTQUAL in FOXPRO.H), PRTINFO( ) returns a positive value indicating the horizontal resolution in dots per inch (DPI), or a negative value indicating the print quality:

    Return values Setting
    –1 Draft
    –2 Low
    –3 Medium
    –4 High

    If nPrinterSetting equals 9 (PRT_COLOR in FOXPRO.H), PRTINFO( ) returns a value indicating if a color printer renders color or monochrome output:

    Return values Setting
    1 Monochrome
    2 Color

    If nPrinterSetting equals 10 (PRT_DUPLEX in FOXPRO.H), PRTINFO( ) returns the duplex mode:

    Return values Setting
    1 Simplex printing
    2 Vertical duplex
    3 Horizontal duplex

    If nPrinterSetting equals 11 (PRT_YRESOLUTION in FOXPRO.H), PRTINFO( ) returns the vertical resolution in dots per inch (DPI). – 1 is returned if this information is not available.

    If nPrinterSetting equals 12 (PRT_TTOPTION in FOXPRO.H), PRTINFO( ) returns a value that indicates how TrueType® fonts are printed:

    Return values Setting
    1 Print as bitmapped graphics
    2 Download as soft fonts
    3 Substitute device fonts

    If nPrinterSetting equals 13 , PRTINFO( ) returns a value that indicates if output is collated:

    Return values Setting
    0 No collation
    1 Collated
  • cPrinterName
    Specifies the name of the printer for which information is returned. If cPrinterName is omitted, information is returned for the default printer.

Remarks

Visual FoxPro printer settings are set in the Page Setup dialog box. Choose Page Setup from the File menu to display the Visual FoxPro Page Setup dialog box.

See Also

GETPRINTER( ) | PRINTSTATUS( ) | SET DEVICE | SET PRINTER | SYS(13) – Printer Status | SYS(1037) – Page Setup Dialog Box