GUI ScreenIO for Windows

 ScreenIO.com


Printer Setup Data (GS-DEVMODE-DATA)

The GS-DEVMODE-DATA resides in the GSPRTDEF.COB copybook.  This copybook holds what Microsoft calls DEVMODE data (Device Mode data) which is used to pass data to the printer sub-system to set up the printer.

The PrintDlg API will invoke the Standard Printer Dialog, and return this information to you in this data structure.  The OpenPrinter API and the PrintFile API will pass this data to the printer.  You may make changes to this information by using any of the settings provided in 88 items below. You need to set only those that are of interest to you, and you can allow the rest to default to the printer's default settings.

The definitions of the data names are below.

DMDEVICENAME
Specifies the "friendly" name of the printer or display; for example, "PCL/HP LaserJet" in the case of PCL/HP LaserJet. This string is unique among device drivers. Note that this name may be truncated to fit in the DMDEVICENAME array.
DMSPECVERSION
Specifies the version number of the initialization data specification on which the structure is based. 
DMDRIVERVERSION
Specifies the driver version number assigned by the driver developer.
DMSIZE
Specifies the size, in bytes, of the DEVMODE portion of this structure, not including any auxiliary data that might follow.
DMDRIVEREXTRA
Contains the number of bytes of auxiliary driver-data that follow this structure. This may be zero.
DMFIELDS
Specifies whether certain items in structure have been initialized. If a field is initialized, its corresponding bit is set, otherwise the bit is clear. 
DMORIENTATION
For printer devices only, selects the orientation of the paper. This field can be either DMORIENT-PORTRAIT (1) or DMORIENT-LANDSCAPE (2).
DMPAPERSIZE
For printer devices only, selects the size of the paper to print on. This field can be set to zero if the length and width of the paper are both set by the DMPAPERLENGTH and DMPAPERWIDTH fields. Otherwise, the DMPAPERSIZE field can be set to one of the following predefined values.
Value Meaning
DMPAPER-LETTER Letter, 8 1/2- by 11-inches
DMPAPER-LEGAL Legal, 8 1/2- by 14-inches
DMPAPER-10X14 10- by 14-inch sheet
DMPAPER-11X17 11- by 17-inch sheet
DMPAPER-12X11 Windows 98/Me, Windows NT 4.0 and later: 12- by 11-inch sheet
DMPAPER-A3 A3 sheet, 297- by 420-millimeters
DMPAPER-A3-ROTATED Windows 98/Me, Windows NT 4.0 and later: A3 rotated sheet, 420- by 297-millimeters
DMPAPER-A4 A4 sheet, 210- by 297-millimeters
DMPAPER-A4-ROTATED Windows 98/Me, Windows NT 4.0 and later: A4 rotated sheet, 297- by 210-millimeters
DMPAPER-A4SMALL A4 small sheet, 210- by 297-millimeters
DMPAPER-A5 A5 sheet, 148- by 210-millimeters
DMPAPER-A5-ROTATED Windows 98/Me, Windows NT 4.0 and later: A5 rotated sheet, 210- by 148-millimeters
DMPAPER-A6 Windows 98/Me, Windows NT 4.0 and later: A6 sheet, 105- by 148-millimeters
DMPAPER-A6-ROTATED Windows 98/Me, Windows NT 4.0 and later: A6 rotated sheet, 148- by 105-millimeters
DMPAPER-B4 B4 sheet, 250- by 354-millimeters
DMPAPER-B4-JIS-ROTATED Windows 98/Me, Windows NT 4.0 and later: B4 (JIS) rotated sheet, 364- by 257-millimeters
DMPAPER-B5 B5 sheet, 182- by 257-millimeter paper
DMPAPER-B5-JIS-ROTATED Windows 98/Me, Windows NT 4.0 and later: B5 (JIS) rotated sheet, 257- by 182-millimeters
DMPAPER-B6-JIS Windows 98/Me, Windows NT 4.0 and later: B6 (JIS) sheet, 128- by 182-millimeters
DMPAPER-B6-JIS-ROTATED Windows 98/Me, Windows NT 4.0 and later: B6 (JIS) rotated sheet, 182- by 128-millimeters
DMPAPER-CSHEET C Sheet, 17- by 22-inches
DMPAPER-DBL-JAPANESE-POSTCARD Windows 98/Me, Windows NT 4.0 and later: Double Japanese Postcard, 200- by 148-millimeters
DMPAPER-DBL-JAPANESE-POSTCARD-ROTATED Windows 98/Me, Windows NT 4.0 and later: Double Japanese Postcard Rotated, 148- by 200-millimeters
DMPAPER-DSHEET D Sheet, 22- by 34-inches
DMPAPER-ENV-9 #9 Envelope, 3 7/8- by 8 7/8-inches
DMPAPER-ENV-10 #10 Envelope, 4 1/8- by 9 1/2-inches
DMPAPER-ENV-11 #11 Envelope, 4 1/2- by 10 3/8-inches
DMPAPER-ENV-12 #12 Envelope, 4 3/4- by 11-inches
DMPAPER-ENV-14 #14 Envelope, 5- by 11 1/2-inches
DMPAPER-ENV-C5 C5 Envelope, 162- by 229-millimeters
DMPAPER-ENV-C3 C3 Envelope, 324- by 458-millimeters
DMPAPER-ENV-C4 C4 Envelope, 229- by 324-millimeters
DMPAPER-ENV-C6 C6 Envelope, 114- by 162-millimeters
DMPAPER-ENV-C65 C65 Envelope, 114- by 229-millimeters
DMPAPER-ENV-B4 B4 Envelope, 250- by 353-millimeters
DMPAPER-ENV-B5 B5 Envelope, 176- by 250-millimeters
DMPAPER-ENV-B6 B6 Envelope, 176- by 125-millimeters
DMPAPER-ENV-DL DL Envelope, 110- by 220-millimeters
DMPAPER-ENV-ITALY Italy Envelope, 110- by 230-millimeters
DMPAPER-ENV-MONARCH Monarch Envelope, 3 7/8- by 7 1/2-inches
DMPAPER-ENV-PERSONAL 6 3/4 Envelope, 3 5/8- by 6 1/2-inches
DMPAPER-ESHEET E Sheet, 34- by 44-inches
DMPAPER-EXECUTIVE Executive, 7 1/4- by 10 1/2-inches
DMPAPER-FANFOLD-US US Std Fanfold, 14 7/8- by 11-inches
DMPAPER-FANFOLD-STD-GERMAN German Std Fanfold, 8 1/2- by 12-inches
DMPAPER-FANFOLD-LGL-GERMAN German Legal Fanfold, 8 - by 13-inches
DMPAPER-FOLIO Folio, 8 1/2- by 13-inch paper
DMPAPER-JAPANESE-POSTCARD-ROTATED Windows 98/Me, Windows NT 4.0 and later: Japanese Postcard Rotated, 148- by 100-millimeters
DMPAPER-JENV-CHOU3 Windows 98/Me, Windows NT 4.0 and later: Japanese Envelope Chou #3
DMPAPER-JENV-CHOU3-ROTATED Windows 98/Me, Windows NT 4.0 and later: Japanese Envelope Chou #3 Rotated
DMPAPER-JENV-CHOU4 Windows 98/Me, Windows NT 4.0 and later: Japanese Envelope Chou #4
DMPAPER-JENV-CHOU4-ROTATED Windows 98/Me, Windows NT 4.0 and later: Japanese Envelope Chou #4 Rotated
DMPAPER-JENV-KAKU2 Windows 98/Me, Windows NT 4.0 and later: Japanese Envelope Kaku #2
DMPAPER-JENV-KAKU2-ROTATED Windows 98/Me, Windows NT 4.0 and later: Japanese Envelope Kaku #2 Rotated
DMPAPER-JENV-KAKU3 Windows 98/Me, Windows NT 4.0 and later: Japanese Envelope Kaku #3
DMPAPER-JENV-KAKU3-ROTATED Windows 98/Me, Windows NT 4.0 and later: Japanese Envelope Kaku #3 Rotated
DMPAPER-JENV-YOU4 Windows 98/Me, Windows NT 4.0 and later: Japanese Envelope You #4
DMPAPER-JENV-YOU4-ROTATED Windows 98/Me, Windows NT 4.0 and later: Japanese Envelope You #4 Rotated
DMPAPER-LAST Windows 2000/XP: DMPAPER-PENV-10-ROTATED
DMPAPER-LEDGER Ledger, 17- by 11-inches
DMPAPER-LETTER-ROTATED Letter Rotated 11 by 8 1/2 11 inches
DMPAPER-LETTERSMALL Letter Small, 8 1/2- by 11-inches
DMPAPER-NOTE Note, 8 1/2- by 11-inches
DMPAPER-P16K Windows 98/Me, Windows NT 4.0 and later: PRC 16K, 146- by 215-millimeters
DMPAPER-P16K-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC 16K Rotated, 215- by 146-millimeters
DMPAPER-P32K Windows 98/Me, Windows NT 4.0 and later: PRC 32K, 97- by 151-millimeters
DMPAPER-P32K-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC 32K Rotated, 151- by 97-millimeters
DMPAPER-P32KBIG Windows 98/Me, Windows NT 4.0 and later: PRC 32K(Big) 97- by 151-millimeters
DMPAPER-P32KBIG-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC 32K(Big) Rotated, 151- by 97-millimeters
DMPAPER-PENV-1 Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #1, 102- by 165-millimeters
DMPAPER-PENV-1-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #1 Rotated, 165- by 102-millimeters
DMPAPER-PENV-2 Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #2, 102- by 176-millimeters
DMPAPER-PENV-2-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #2 Rotated, 176- by 102-millimeters
DMPAPER-PENV-3 Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #3, 125- by 176-millimeters
DMPAPER-PENV-3-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #3 Rotated, 176- by 125-millimeters
DMPAPER-PENV-4 Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #4, 110- by 208-millimeters
DMPAPER-PENV-4-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #4 Rotated, 208- by 110-millimeters
DMPAPER-PENV-5 Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #5, 110- by 220-millimeters
DMPAPER-PENV-5-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #5 Rotated, 220- by 110-millimeters
DMPAPER-PENV-6 Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #6, 120- by 230-millimeters
DMPAPER-PENV-6-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #6 Rotated, 230- by 120-millimeters
DMPAPER-PENV-7 Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #7, 160- by 230-millimeters
DMPAPER-PENV-7-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #7 Rotated, 230- by 160-millimeters
DMPAPER-PENV-8 Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #8, 120- by 309-millimeters
DMPAPER-PENV-8-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #8 Rotated, 309- by 120-millimeters
DMPAPER-PENV-9 Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #9, 229- by 324-millimeters
DMPAPER-PENV-9-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #9 Rotated, 324- by 229-millimeters
DMPAPER-PENV-10 Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #10, 324- by 458-millimeters
DMPAPER-PENV-10-ROTATED Windows 98/Me, Windows NT 4.0 and later: PRC Envelope #10 Rotated, 458- by 324-millimeters
DMPAPER-QUARTO Quarto, 215- by 275-millimeter paper
DMPAPER-STATEMENT Statement, 5 1/2- by 8 1/2-inches
DMPAPER-TABLOID Tabloid, 11- by 17-inches
 
DMPAPERLENGTH
For printer devices only, overrides the length of the paper specified by the DMPAPERSIZE field, either for custom paper sizes or for devices such as dot-matrix printers that can print on a page of arbitrary length. These values, along with all other values in this structure that specify a physical length, are in tenths of a millimeter.
DMPAPERWIDTH
For printer devices only, overrides the width of the paper specified by the DMPAPERSIZE field.
DMSCALE
Specifies the factor by which the printed output is to be scaled. The apparent page size is scaled from the physical page size by a factor of DMSCALE/100. For example, a letter-sized page with a DMSCALE value of 50 would contain as much data as a page of 17- by 22-inches because the output text and graphics would be half their original height and width.  nORMALLY SET TO 100.
DMCOPIES
Selects the number of copies printed if the device supports multiple-page copies.
DMDEFAULTSOURCE
Specifies the paper source. To retrieve a list of the available paper sources for a printer.

This field can be one of the following values, or it can be a device-specific value greater than or equal to DMBIN-USER.
DMBIN-AUTO
DMBIN-CASSETTE
DMBIN-ENVELOPE
DMBIN-ENVMANUAL
DMBIN-FORMSOURCE
DMBIN-LARGECAPACITY
DMBIN-LARGEFMT
DMBIN-LOWER
DMBIN-MANUAL
DMBIN-MIDDLE
DMBIN-ONLYONE
DMBIN-TRACTOR
DMBIN-SMALLFMT

DMPRINTQUALITY
Specifies the printer resolution. There are four predefined device-independent values: (NEGATIVE values)

DMRES-HIGH
DMRES-MEDIUM
DMRES-LOW
DMRES-DRAFT

If a positive value is specified, it specifies the number of dots per inch (DPI) and is therefore device dependent.

DMCOLOR
Switches between color and monochrome on color printers. Following are the possible values:

DMCOLOR-COLOR
DMCOLOR-MONOCHROME

DMDUPLEX
Selects duplex or double-sided printing for printers capable of duplex printing. Following are the possible values.
Value Meaning
DMDUP-SIMPLEX Normal (nonduplex) printing.
DMDUP-HORIZONTAL Short-edge binding, that is, the long edge of the page is horizontal.
DMDUP-VERTICAL Long-edge binding, that is, the long edge of the page is vertical.

DMYRESOLUTION
Specifies the y-resolution, in dots per inch, of the printer. If the printer initializes this field, the DMPRINTQUALITY field specifies the x-resolution, in dots per inch, of the printer.
DMTTOPTIONS
Specifies how TrueType fonts should be printed. This field can be one of the following values.
Value Meaning
DMTT-BITMAP Prints TrueType fonts as graphics. This is the default action for dot-matrix printers.
DMTT-DOWNLOAD Downloads TrueType fonts as soft fonts. This is the default action for Hewlett-Packard printers that use Printer Control Language (PCL).
DMTT-DOWNLOAD-OUTLINE Window 95/98/Me, Windows NT 4.0 and later: Downloads TrueType fonts as outline soft fonts.
DMTT-SUBDEV Substitutes device fonts for TrueType fonts. This is the default action for PostScript printers.

DMCOLLATE
Specifies whether collation should be used when printing multiple copies. (This field is ignored unless the printer driver includes support for collation.  This field can be one of the following values.
Value Meaning
DMCOLLATE-TRUE Collate when printing multiple copies.
DMCOLLATE-FALSE Do not collate when printing multiple copies.

DMFORMSNAME
Windows NT/2000/XP: Specifies the name of the form to use; for example, "Letter" or "Legal". 

Windows 95/98/Me: Printer drivers do not use this field.

DMNUP
Specifies where the NUP is done. It can be one of the following.  NUP = N Up, as in 3-up labels etc.
Value Meaning
DMNUP-SYSTEM The print spooler does the NUP.
DMNUP-ONEUP The application does the NUP.

DMICMMETHOD
Windows 95/98/Me; Windows 2000/XP: Specifies how ICM is handled. For a non-ICM application, this field determines if ICM is enabled or disabled. For ICM applications, the system examines this field to determine how to handle ICM support. This field can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMICMMETHOD-USER.
Value Meaning
DMICMMETHOD-NONE Specifies that ICM is disabled.
DMICMMETHOD-SYSTEM Specifies that ICM is handled by Windows.
DMICMMETHOD-DRIVER Specifies that ICM is handled by the device driver.
DMICMMETHOD-DEVICE Specifies that ICM is handled by the destination device.

The printer driver must provide a user interface for setting this field. Most printer drivers support only the DMICMMETHOD-SYSTEM or DMICMMETHOD-NONE value. Drivers for PostScript printers support all values.

CMICMINTENT
Windows 95/98/Me, Windows 2000/XP: Specifies which color matching method, or intent, should be used by default. This field is primarily for non-ICM applications. ICM applications can establish intents by using the ICM functions. This field can be one of the following predefined values, or a driver defined value greater than or equal to the value of DMICM-USER.
Value Meaning
DMICM-ABS-COLORIMETRIC Color matching should optimize to match the exact color requested without white point mapping. This value is most appropriate for use with proofing.
DMICM-COLORMETRIC Color matching should optimize to match the exact color requested. This value is most appropriate for use with business logos or other images when an exact color match is desired.
DMICM-CONTRAST Color matching should optimize for color contrast. This value is the most appropriate choice for scanned or photographic images when dithering is desired.
DMICM-SATURATE Color matching should optimize for color saturation. This value is the most appropriate choice for business graphs when dithering is not desired.

DMMEDIATYPE
Windows 95/98/Me, Windows 2000/XP: Specifies the type of media being printed on. The field can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMMEDIA-USER.
Value Meaning
DMMEDIA-STANDARD Plain paper.
DMMEDIA-GLOSSY Glossy paper.
DMMEDIA-TRANSPARENCY Transparent film.

DMDITHERTYPE
Windows 95/98/Me, Windows 2000/XP: Specifies how dithering is to be done. The field can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMDITHER-USER.
Value Meaning
DMDITHER-NONE No dithering.
DMDITHER-COARSE Dithering with a coarse brush.
DMDITHER-FINE Dithering with a fine brush.
DMDITHER-LINEART Line art dithering, a special dithering method that produces well defined borders between black, white, and gray scaling. It is not suitable for images that include continuous graduations in intensity and hue, such as scanned photographs.
DMDITHER-ERRORDIFFUSION Windows 95/98/Me: Dithering in which an algorithm is used to spread, or diffuse, the error of approximating a specified color over adjacent pixels. In contrast, DMDITHER-COARSE, DMDITHER-FINE, and DMDITHER-LINEART use patterned halftoning to approximate a color.
DMDITHER-GRAYSCALE Device does gray scaling.
 
DM-RESERVED 
(just what it says)
 

2000-2019 Norcom, all rights reserved 

TOC

Send feedback to Norcom