Click or drag to resize

Functions.PrtInfo Method

-- todo --
Returns the current specified printer setting.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.17
Request Example View Source


nPrinterSetting (Optional)
Type: Usual
Specifies which X# printer setting to return. The table in the remarks section lists descriptions of the type of printer settings returned.
cPrinterName (Optional)
Type: Usual
Specifies the name of the printer for which information is returned. If cPrinterName is omitted, information is returned for the default printer.

Return Value

Type: Long
Numeric data type. The following tables list values returned when specifying particular values for nPrinterSetting.
If nPrinterSetting is 1, PrtInfo( ) returns the paper orientation as the following:
Return valuesPaper orientation
-1Information not available
If nPrinterSetting is 2, PrtInfo( ) returns the paper size as the following:
Return valuesPaper Size
–1 or value other than listedInformation not available. Use nPrinterSetting = 3 and nPrinterSetting = 4 to return the paper size.
1Letter, 8 1/2 x 11 in
2Letter Small, 8 1/2 x 11 in
3Tabloid, 11 x 17 in
4Ledger, 17 x 11 in
5Legal, 8 1/2 x 14 in
6Statement, 5 1/2 x 8 1/2 in
7Executive, 7 1/4 x 10 1/2 in
8A3, 297 x 420 mm
9A4, 210 x 297 mm
10A4, Small 210 x 297 mm
11A5, 148 x 210 mm
12B4, 250 x 354 mm
13B5, 182 x 257 mm
14Folio, 8 1/2 x 13 in
15Quarto, 215 x 275 mm
1610 x 14 in
1711 x 17 in
18Note, 8 1/2 x 11 in
19Envelope #9, 3 7/8 x 8 7/8 in
20Envelope #10, 4 1/8 x 9 1/2 in
21Envelope #11, 4 1/2 x 10 3/8 in
22Envelope #12, 4 1/2 x 11 in
23Envelope #14, 5 x 11 1/2 in
24C size sheet
25D size sheet
26E size sheet
27Envelope DL, 110 x 220 mm
28Envelope C5, 162 x 229 mm
29Envelope C3, 324 x 458 mm
30Envelope C4, 229 x 324 mm
31Envelope C6, 114 x 162 mm
32Envelope C65, 114 x 229 mm
33Envelope B4, 250 x 353 mm
34Envelope B5, 176 x 250 mm
35Envelope B6, 176 x 125 mm
36Envelope, 110 x 230 mm
37Envelope Monarch, 3 7/8 x 7.5 in
386 3/4 Envelope, 3 5/8 x 6 1/2 in
39US Std Fanfold, 14 7/8 x 11 in
40German Std Fanfold, 8 1/2 x 12 in
41German Legal Fanfold, 8 1/2 x 13 in
If nPrinterSetting is 7, PrtInfo( ) returns the default paper source as the following:
Return valuesDefault paper source
1Upper bin
2Lower bin
3Middle bin
4Manual feed
5Envelope bin
6Manual feed envelope
7Automatic feed
8Tractor feed
9Small format
10Large format
11Large capacity
15Default input bin (automatically select)
If nPrinterSetting is 8 and PrtInfo( ) returns a negative value, the return value indicates the print quality as the following:
Return valuesPrint quality
If nPrinterSetting is 9, PrtInfo( ) returns a value indicating if a color printer renders color or monochrome output as the following:
Return valuesColor of output
If nPrinterSetting is 10, PrtInfo( ) returns the duplex mode as the following:
Return valuesDuplex mode
1Simplex printing
2Vertical duplex
3Horizontal duplex
If nPrinterSetting is 12, PrtInfo( ) returns a value that indicates how TrueType® fonts are printed as the following:
Return valuesPrinting of TrueType® fonts
1Print as bitmapped graphics
2Download as soft fonts
3Substitute device fonts
If nPrinterSetting is 13, PrtInfo( ) returns a value that indicates if output is collated as the following:
Return valuesCollation
0No collation
You can set X# printer settings in the printer Page Setup dialog box. For more information, see Page Setup Dialog Box.
nPrinterSettingXSHARP.HSetting returned
1PRT_ORIENTATIONPaper orientation
3PRT_PAPERLENGTHPaper length in .1 millimeter increments
4PRT_PAPERWIDTHPaper width in .1 millimeter increments
5PRT_SCALEFactor by which printer output is scaled
6PRT_COPIESNumber of copies to print
7PRT_DEFASOURCEDefault paper source
8PRT_PRINTQUALA positive value that indicates the horizontal resolution in dots per inch (DPI) or a negative value that indicates the print quality.
9PRT_COLORA value that indicates if a color printer rends color or monochrome output
10PRT_DUPLEXDuplex mode
11PRT_YRESOLUTIONThe vertical resolution in dots per inch (DPI). If not available, a value of -1 is returned.
12PRT_TTOPTIONA value that indicates how TrueType® fonts are printed
13PRT_COLLATEA value that indicates if output is collated
See Also