Name | Value | Description | |||
exPaperSize | 0 |
The exPaperSize property gets or sets the size of the paper on which the document
will be printed. The exFormName property gets the name of the paper form or size that the printer
uses. This property must be assigned one of the predefined values
from the available list of standard paper sizes to ensure correct formatting and
output.
For instance,
Just because a value exists in the Windows API does not mean your printer driver supports it. Always check supported paper sizes via the printer capabilities. Constant Name Value Description Dimensions (mm) ------------------------- ----- ------------------------------ ----------------- DMPAPER_LETTER 1 Letter 215.9 x 279.4 DMPAPER_LETTERSMALL 2 Letter Small 215.9 x 279.4 DMPAPER_TABLOID 3 Tabloid 279.4 x 431.8 DMPAPER_LEDGER 4 Ledger 431.8 x 279.4 DMPAPER_LEGAL 5 Legal 215.9 x 355.6 DMPAPER_STATEMENT 6 Statement 139.7 x 215.9 DMPAPER_EXECUTIVE 7 Executive 184.15 x 266.7 DMPAPER_A3 8 A3 297 x 420 DMPAPER_A4 9 A4 210 x 297 DMPAPER_A4SMALL 10 A4 Small 210 x 297 DMPAPER_A5 11 A5 148 x 210 DMPAPER_B4 12 B4 (JIS) 250 x 354 DMPAPER_B5 13 B5 (JIS) 182 x 257 DMPAPER_FOLIO 14 Folio 215.9 x 330.2 DMPAPER_QUARTO 15 Quarto 215 x 275 DMPAPER_10X14 16 10 x 14 in 254 x 355.6 DMPAPER_11X17 17 11 x 17 in 279.4 x 431.8 DMPAPER_NOTE 18 Note 215.9 x 279.4 DMPAPER_ENV_9 19 Envelope #9 98.4 x 225.4 DMPAPER_ENV_10 20 Envelope #10 104.8 x 241.3 DMPAPER_ENV_11 21 Envelope #11 114.3 x 263.5 DMPAPER_ENV_12 22 Envelope #12 120.7 x 279.4 DMPAPER_ENV_14 23 Envelope #14 127 x 292.1 DMPAPER_CSHEET 24 C Sheet 17 x 22 in 431.8 x 558.8 DMPAPER_DSHEET 25 D Sheet 22 x 34 in 558.8 x 863.6 DMPAPER_ESHEET 26 E Sheet 34 x 44 in 863.6 x 1117.6 DMPAPER_ENV_DL 27 Envelope DL 110 x 220 DMPAPER_ENV_C5 28 Envelope C5 162 x 229 DMPAPER_ENV_C3 29 Envelope C3 324 x 458 DMPAPER_ENV_C4 30 Envelope C4 229 x 324 DMPAPER_ENV_C6 31 Envelope C6 114 x 162 DMPAPER_ENV_C65 32 Envelope C65 114 x 229 DMPAPER_ENV_B4 33 Envelope B4 250 x 353 DMPAPER_ENV_B5 34 Envelope B5 176 x 250 DMPAPER_ENV_B6 35 Envelope B6 176 x 125 DMPAPER_ENV_ITALY 36 Envelope Italy 110 x 230 DMPAPER_ENV_MONARCH 37 Envelope Monarch 98.4 x 190.5 DMPAPER_ENV_PERSONAL 38 6 3/4 Envelope 92.1 x 165.1 DMPAPER_FANFOLD_US 39 US Std Fanfold 368.3 x 279.4 DMPAPER_FANFOLD_STD_GERMAN 40 Std German Fanfold 210 x 305 DMPAPER_FANFOLD_LGL_GERMAN 41 Legal German Fanfold 210 x 330 DMPAPER_ISO_B4 42 ISO B4 250 x 353 DMPAPER_JAPANESE_POSTCARD 43 Japanese Postcard 100 x 148 DMPAPER_9X11 44 9 x 11 in 228.6 x 279.4 DMPAPER_10X11 45 10 x 11 in 254 x 279.4 DMPAPER_15X11 46 15 x 11 in 381 x 279.4 DMPAPER_ENV_INVITE 47 Envelope Invite 220 x 220 DMPAPER_LETTER_EXTRA 50 Letter Extra 235.5 x 304.8 DMPAPER_LEGAL_EXTRA 51 Legal Extra 235.5 x 381 DMPAPER_TABLOID_EXTRA 52 Tabloid Extra 304.8 x 457.2 DMPAPER_A4_EXTRA 53 A4 Extra 236 x 322 DMPAPER_LETTER_TRANSVERSE 54 Letter Transverse 215.9 x 279.4 DMPAPER_A4_TRANSVERSE 55 A4 Transverse 210 x 297 DMPAPER_LETTER_EXTRA_TRANSVERSE 56 Letter Extra Transverse 235.5 x 304.8 DMPAPER_A_PLUS 57 Super A 227 x 356 DMPAPER_B_PLUS 58 Super B 305 x 487 DMPAPER_A2 66 A2 420 x 594 DMPAPER_A1 70 A1 594 x 841 DMPAPER_A0 71 A0 841 x 1189 Note: The table lists official paper size constants and their values as defined in the Windows SDK (wingdi.h). (long expression) | |||
exPaperSource | 1 |
The exPaperSource property gets or sets the paper source. The member accepts one of the following predefined values:
For instance,
(long expression) | |||
exPageOrientation | 2 |
The exPageOrientation property gets or sets the direction in which the content is printed on the page. It determines whether the page is taller than it is wide (portrait) or wider than it is tall (landscape). The PageOrientation property is equivalent of Settings(exPageOrientation) option. Accepted values:
Use this property to match the layout of your content with the appropriate paper orientation. For instance,
(long expression) | |||
exPrinterName | 3 |
The exPrinterName property gets or sets the user-friendly name of the selected printer or display device. For example, it may return a name like "Xerox WorkCentre 3025" for a compatible Xerox printer. This name uniquely identifies the printer among all installed device drivers on the system. To obtain a list of all available printers, use the Printers property. Important: If you intend to change the selected printer by setting exPrinterName, you must do so before configuring any other printer-related settings. Otherwise, the new printer settings may not take effect correctly. For instance,
(string expression) | |||
exPrinterCopies | 4 |
The exPrinterCopies property gets or sets how many copies of the document will be printed, provided that the printer supports printing multiple copies in a single job.
For instance,
(long expression) | |||
exPrintQuality | 5 |
The exPrintQuality property gets or sets the printer resolution. It supports four predefined device-independent values, each corresponding to a specific print quality level:
Alternatively, if a positive value is specified, it indicates the number of dots per inch (DPI) for the printer, which depends on the device's capabilities and may vary between printers. For instance:
(long expression) | |||
exLeftMargin | 6 |
The exLeftMargin property gets or sets the width of the left margin. The unit of measurement depends on the value of the exDisplayInch property:
This property allows for precise control over page layout. For example, a setting of 1500 indicates a left margin of 1.5 inches when measured in thousandths of inches. For instance:
(long expression) | |||
exTopMargin | 7 |
The exTopMargin property gets or sets the heigh of the top margin. The unit of measurement depends on the value of the exDisplayInch property:
This setting defines the amount of space between the top edge of the paper and the start of the printable content. For example, a value of 1500 corresponds to a 1.5-inch top margin when using thousandths of inches. For instance:
(long expression) | |||
exRightMargin | 8 |
The exRightMargin property gets or sets the width of the right margin. The unit of measurement is determined by the value of the exDisplayInch property:
This setting provides control over the right margin of the printed page. For example, a value of 1500 specifies a right margin of 1.5 inches when using thousandths of inches as the unit. For instance:
(long expression) | |||
exBottomMargin | 9 |
The exBottomMargin property gets or sets the height of the bottom margin. The unit of measurement is determined by the exDisplayInch property:
This setting defines the distance between the bottom edge of the paper and the end of the printable area. For example, a value of 2000 indicates a 2.0-inch bottom margin when using thousandths of inches. For instance:
(long expression) | |||
exDisplayInch | 10 |
The exDisplayInch property determines the unit of measurement used for margins and paper size in the print dialog. It must be set before any other printing-related settings, or it will have no effect. By default, the value is 0, which means measurements are specified in thousandths of inches. If set to 1, measurements are specified in millimeters. Valid values include:
For instance:
(long expression) | |||
exFormName | 11 |
The exFormName property gets the name of the paper form or size that the printer should use. You can use the exPaperSize property to configure the size of the paper on which the document will be printed. This value is a string that must match a form name supported by the printer driver, such as "A4", "Letter", or a custom-defined form.
(string expression) | |||
exPaperWidth | 12 |
The exPaperWidth property defines the total width of the paper. The unit of measurement is determined by the exDisplayInch property:
To find out the width of the printable area within the page margins, use the ClientWidth property. (long expression) | |||
exPaperHeight | 13 |
The
exPaperHeight property defines the total height of the paper. The unit of measurement is determined by the exDisplayInch property:
The ClientHeight property provides the height of the printable area on the page. (long expression) | |||
exAllFields | 256 |
The exAllFields property allows you to get or set the values for all printer-related settings at once. By using the Settings(exAllFields) property, you can save the current configuration of the printer, including paper size, orientation, margins, and other options, and later restore these exact settings. This makes it easier to manage printer configurations without handling each setting individually, ensuring consistency when printing across different sessions or documents. The exAllFields property may return a string similar to:
(string expression) |