jsPrinter Property Members
aPrinters (Registered Release versions only)
A 2-column array object containing the name and port of printers configured on
the system. The first column is the printer name. The second column is the port
the printer is connected to if a local printer, or the network share path for
a shared network printer.
The aPrinters property member is set by the
getPrinters
method.
Default: Empty array
See also:
getPrinterProps,
getPrinters
capDeviceType
A numeric value indicating the type of device for the current device context
represented by the hDC property member. The possible values are:
0 = Vector Plotter
1 = Raster Display
2 = Raster Printer
3 = Raster Camera
4 = Character Stream (used for generic/text drivers)
5 = Metafile
6 = Display File
Any other value = Undefined
The capDeviceType property member is set by the
dialogPrint
method.
Default: -1
See also:
dialogPrint,
hDC
capDUPIX
Indicates the number of horizontal device units per inch for the current device
context represented by the hDC property member. The device unit for printers is
dots. The capDUPIX property member is set by the
dialogPrint
method.
Default: 0
See also:
capDUPIX,
capHeightInches,
capHeightMil,
capWidthDU,
capWidthInches,
capWidthMil,
dialogPrint,
hDC
capDUPIY
Indicates the number of vertical device units per inch for the current device
context represented by the hDC property member. The device unit for printers is
dots. The capDUPIY property member is set by the
dialogPrint
method.
Default: 0
See also:
capDUPIX,
capHeightInches,
capHeightMil,
capWidthDU,
capWidthInches,
capWidthMil,
dialogPrint,
hDC
capHeightDU
Indicates the height, in device units, of the printable area for the current device
context represented by the hDC property member. The device unit for printers is
dots. The capHeightDU property member is set by the
dialogPrint
method.
Default: 0
See also:
capHeightInches,
capHeightMil,
capWidthDU,
capWidthInches,
capWidthMil,
dialogPrint,
hDC
capHeightInches
Indicates the height, in inches, of the printable area for the current device
context represented by the hDC property member. The capHeightInches property member is set by the
dialogPrint
method.
Default: 0
See also:
capHeightDU,
capHeightMil,
capWidthDU,
capWidthInches,
capWidthMil,
dialogPrint,
hDC
capHeightMil
Indicates the height, in millimeters, of the printable area for the current device
context represented by the hDC property member. The capHeightMil property member is set by the
dialogPrint
method.
Default: 0
See also:
capHeightDU,
capHeightInches,
capWidthDU,
capWidthInches,
capWidthMil,
dialogPrint,
hDC
capMinMarginBottom
Indicates the minimum size, in device units, of the bottom margin for the current device
context represented by the hDC property member. The capMinMarginBottom property member is set by the
dialogPrint
method.
Default: 0
See also:
capMinMarginLeft,
capMinMarginRight,
capMinMarginTop,
capHeightDU,
capWidthDU,
dialogPrint,
hDC
capMinMarginLeft
Indicates the minimum size, in device units, of the left margin for the current device
context represented by the hDC property member. The capMinMarginLeft property member is set by the
dialogPrint
method.
Default: 0
See also:
capMinMarginBottom,
capMinMarginRight,
capMinMarginTop,
capHeightDU,
capWidthDU,
dialogPrint,
hDC
capMinMarginRight
Indicates the minimum size, in device units, of the right margin for the current device
context represented by the hDC property member. The capMinMarginRight property member is set by the
dialogPrint
method.
Default: 0
See also:
capMinMarginBottom,
capMinMarginLeft,
capMinMarginTop,
capHeightDU,
capWidthDU,
dialogPrint,
hDC
capMinMarginTop
Indicates the minimum size, in device units, of the top margin for the current device
context represented by the hDC property member. The capMinMarginTop property member is set by the
dialogPrint
method.
Default: 0
See also:
capMinMarginBottom,
capMinMarginLeft,
capMinMarginRight,
capHeightDU,
capWidthDU,
dialogPrint,
hDC
capPhysicalOffsetX
Indicates the minimum position, in device units, from the left edge of the paper
where printing can start for the current device
context represented by the hDC property member.
This is the same value as the
capMinMarginLeft
property member.
The capPhysicalOffsetX property member is set by the
dialogPrint
method.
Default: 0
See also:
capMinMarginBottom,
capMinMarginLeft,
capMinMarginRight,
capMinMarginTop,
capHeightDU,
capPhysicalOffsetY,
capWidthDU,
dialogPrint,
hDC
capPhysicalOffsetY
Indicates the minimum position, in device units, from the top edge of the paper
where printing can start for the current device
context represented by the hDC property member.
This is the same value as the
capMinMarginTop
property member.
The capPhysicalOffsetY property member is set by the
dialogPrint
method.
Default: 0
See also:
capMinMarginBottom,
capMinMarginLeft,
capMinMarginRight,
capMinMarginTop,
capHeightDU,
capPhysicalOffsetX,
capWidthDU,
dialogPrint,
hDC
capPhysicalX
Indicates the physical width, in device units, of the paper for the current device
context represented by the hDC property member.
The capPhysicalX property member is set by the
dialogPrint
method.
Default: 0
See also:
capMinMarginBottom,
capMinMarginLeft,
capMinMarginRight,
capMinMarginTop,
capHeightDU,
capPhysicalY,
capWidthDU,
dialogPrint,
hDC
capPhysicalY
Indicates the physical height, in device units, of the paper for the current device
context represented by the hDC property member.
The capPhysicalY property member is set by the
dialogPrint
method.
Default: 0
See also:
capMinMarginBottom,
capMinMarginLeft,
capMinMarginRight,
capMinMarginTop,
capHeightDU,
capPhysicalX,
capWidthDU,
dialogPrint,
hDC
capScalingFactorX
Indicates the horizontal scaling factor for the current device
context represented by the hDC property member.
The capScalingFactorX property member is set by the
dialogPrint
method.
Default: 0
See also:
capScalingFactorY,
dialogPrint,
hDC
capScalingFactorY
Indicates the vertical scaling factor for the current device
context represented by the hDC property member.
The capScalingFactorY property member is set by the
dialogPrint
method.
Default: 0
See also:
capScalingFactorX,
dialogPrint,
hDC
capWidthDU
Indicates the width, in device units, of the printable area for the current device
context represented by the hDC property member. The device unit for printers is
dots. The capWidthDU property member is set by the
dialogPrint
method.
Default: 0
See also:
capHeightInches,
capHeightMil,
capHeightPix,
capWidthInches,
capWidthMil,
dialogPrint,
hDC
capWidthInches
Indicates the width, in inches, of the printable area for the current device
context represented by the hDC property member. The capWidthInches property member is set by the
dialogPrint
method.
Default: 0
See also:
capHeightDU,
capHeightInches,
capHeightMil,
capWidthDU,
capWidthMil,
dialogPrint,
hDC
capWidthMil
Indicates the width, in millimeters, of the printable area for the current device
context represented by the hDC property member. The capWidthMil property member is set by the
dialogPrint
method.
Default: 0
See also:
capHeightDU,
capHeightInches,
capHeightMil,
capWidthDU,
capWidthInches,
dialogPrint,
hDC
dcBins
A 2-column array populated with paper source bin information for the printer
described by the
psdName and psdPort
property member values. The array columns are:
Column 1 = A numeric index identifying the bin.
Column 2 = A text string consisting of the bin name.
The dcBins property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: Empty array
See also:
dcPapers,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dcCollate
Indicates whether the printer
described by the
psdName and psdPort
property member values supports collating.
True  = The printer supports collating.
False = The printer does not support collating.
The dcCollate property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: False
See also:
dmCollate,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dcCopies
Indicates the maximum number of copies the printer
described by the
psdName and psdPort
property member values can print.
The dcCopies property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: False
See also:
dmCopies,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dcMaxExtentX
Indicates the maximum width, in tenths of a millimeter, of the paper supported by the printer
described by the
psdName and psdPort
property member values.
The dcMaxExtentX property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: 0
See also:
dcMaxExtentY,
dcMinExtentX,
dcMinExtentY,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dcMaxExtentY
Indicates the maximum height, in tenths of a millimeter, of the paper supported by the printer
described by the
psdName and psdPort
property member values.
The dcMaxExtentY property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: 0
See also:
dcMaxExtentX,
dcMinExtentX,
dcMinExtentY,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dcMinExtentX
Indicates the minimum width, in tenths of a millimeter, of the paper supported by the printer
described by the
psdName and psdPort
property member values.
The dcMinExtentX property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: 0
See also:
dcMaxExtentX,
dcMaxExtentY,
dcMinExtentY,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dcMinExtentY
Indicates the minimum height, in tenths of a millimeter, of the paper supported by the printer
described by the
psdName and psdPort
property member values.
The dcMinExtentY property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: 0
See also:
dcMaxExtentX,
dcMaxExtentY,
dcMinExtentX,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dcPapers
A 4-column array populated with specifications of supported paper sizes for the printer
described by the
psdName and psdPort
property member values. The array columns are:
Column 1 = A numeric index identifying the paper.
Column 2 = A text string consisting of the paper name.
Column 3 = The width of the paper in tenths of a millimeter.
Column 4 = The height of the paper in tenths of a millimeter.
The dcPapers property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: Empty array
See also:
dcBins,
dmPaperSize,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dcResolutions
A 2-column array populated with supported resolution settings for the printer
described by the
psdName and psdPort
property member values. The array columns are:
Column 1 = The horizontal resolution in device units.
Column 2 = The vertical resolution in device units.
The dcResolutions property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: Empty array
See also:
dmPrintQuality,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dmCollate
Indicates whether the printer described by the
psdName and psdPort
property member values is currently set for collating.
True  = The printer is set for collating.
False = The printer is not set for collating.
The dmCollate property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: False
See also:
dcCollate,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dmColor
Indicates whether the printer described by the
psdName and psdPort
property member values is currently set for color printing. The possible values are:
1 = The printer is set for monochrome printing.
2 = The printer is set for color printing.
The dmColor property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: 0
See also:
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dmCopies
Indicates the number of copies the printer described by the
psdName and psdPort
property member values is currently set to print.
The dmCopies property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: 0
See also:
dcCopies,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dmDefaultSource
Indicates the current paper source bin for the printer described by the
psdName and psdPort
property member values.
The dmDefaultSource property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: 0
See also:
dcBins,
dialogPageSetup,
dialogPrint,
dmFormName,
psdName,
psdPort
dmDriverVersion
Indicates the driver version for the printer described by the
psdName and psdPort
property member values.
The dmDriverVersion property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: ""
See also:
dcBins,
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dmFormName
(NT/2000/XP only) Indicates the name of the form the printer described by the
psdName and psdPort
property member values is currently set to use in the
dmDefaultSource
property member.
The dmFormName property member is set by the
dialogPageSetup
and
dialogPrint
methods.
Default: ""
See also:
dcBins,
dialogPageSetup,
dialogPrint,
dmDefaultSource,
psdName,
psdPort
dmICMIntent
(95/98/ME/2000/XP only) Indicates the default color matching method the printer described by the
psdName and psdPort
property member values.
The dmICMIntent property member is set by the
dialogPageSetup
and
dialogPrint
methods. Possible values are:
1 = Maximize color saturation with no image dithering (Business graphics)
2 = Maximize color contrast with image dithering (Photos and scanned images)
3 = Use exact color matching (Business logos, etc)
4 = Use exact color matching (Proofing)
>= 256 = Printer-specific meaning
Default: 0
See also:
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dmICMMethod
(95/98/ME/2000/XP only) Indicates how color matching is handled for the printer described by the
psdName and psdPort
property member values.
The dmICMMethod property member is set by the
dialogPageSetup
and
dialogPrint
methods. Possible values are:
1 = Color matching is disabled
2 = Color matching is handled by the system
3 = Color matching is handled by the driver
4 = Color matching is handled by the printer
>= 256 = Printer-specific meaning
Default: 0
See also:
dialogPageSetup,
dialogPrint,
psdName,
psdPort
dmMediaType
(95/98/ME/2000/XP only) Indicates the media type the printer described by the
psdName and psdPort
property member values is currently set to use.
The dmMediaType property member is set by the
dialogPageSetup
and
dialogPrint
methods. Possible values are:
1 = Plain paper
2 = Glossy paper
3 = Transparency
>= 256: Printer-specific
Default: 0
See also:
dcBins,
dialogPageSetup,
dialogPrint,
dmDefaultSource,
psdName,
psdPort
dmOrientation
Indicates the media orientation the printer described by the
psdName and psdPort
property member values is currently set to use.
The dmOrientation property member is set by the
dialogPageSetup
and
dialogPrint
methods. Possible values are:
1 = Portrait
2 = Landscape
Default: 0
See also:
dcBins,
dialogPageSetup,
dialogPrint,
dmDefaultSource,
psdName,
psdPort
dmPaperSize
Indicates the index of the media size the printer described by the
psdName and psdPort
property member values is currently set to use.
The dmPaperSize property member is set by the
dialogPageSetup
and
dialogPrint
methods. Possible values are for dmPaperSize are determined by the specific
printer being used. The latest operating system defines and supports 118
different paper sizes. However, no printer supports all possible paper sizes.
Additionally, the possibility for user-defined paper sizes exists (dmPaperSize
> = 256).
To determine the possible values for dmPaperSize for the currently selected
printer, examine the jsPrinter object's dcPapers
array. And to determine the size of the currently selected paper, use the
capPhysicalX and
capPhysicalY property member values.
Default: 0
See also:
dcBins,
dcPapers,
dialogPageSetup,
dialogPrint,
dmDefaultSource,
psdName,
psdPort
dmPrintQuality
Indicates the print quality mode the printer described by the
psdName and psdPort
property member values is currently set to use.
The dmPrintQuality property member is set by the
dialogPageSetup
and
dialogPrint
methods. Possible values for dmPrintQuality are:
-1 = Draft
-2 = Low
-3 = Medium
-4 = High
> 0 = Printer-dependent dots per inch (DPI)
Default: 0
See also:
dialogPageSetup,
dialogPrint,
dmColor,
psdName,
psdPort
dmSpecVersion
Indicates the initialization version of the DEVMODE structure used for the printer described by the
psdName and psdPort
property member values.
The dmSpecVersion property member is set by the
dialogPageSetup
and
dialogPrint
methods. The dmSpecVersion value is meaningless in normal dBL applications.
However, it is provided as a convenience/debug aid when working to troubleshoot
printer problems for working with manufacturer printer support personnel, etc.
The more significant version number when troubleshooting printer problems is the
value of the dmDriverVersion property member.
Default: ""
See also:
dialogPageSetup,
dialogPrint,
dmDriverVersion,
psdName,
psdPort
hDC
Holds the handle of a printer device context representing the printer selected
by the user durina call to the
dialogPrint
method. The
delete
method should be called to delete the printer device context when
it is no longer needed.
Default: 0
See also:
deleteDC,
dialogPrint
pdCollate
Sets the checkmark of the collate checkbox in the
dialogPrint
dialog.
True = Set the checkmark on.
False = Set the checkmark off.
Default: false
See also:
dialogPrint
pdCopies
Sets the value of the copies entryfield in the
dialogPrint
dialog.
Default: 1
See also:
dialogPrint
pdDisablePrintToFile
Enables/disables the print to file checkbox in the
dialogPrint
dialog.
True = Disable the checkbox.
False = Enable the checkbox.
Default: false
See also:
dialogPrint
pdFromPage
Sets the value of the from page entryfield in the
dialogPrint
dialog.
Default: 1
See also:
dialogPrint
pdHidePrintToFile
Shows/hides the print to file checkbox in the
dialogPrint
dialog.
True = Hide the checkbox.
False = Show the checkbox.
Default: false
See also:
dialogPrint
pdMaxPage
Sets the highest page number the user is allowed to set in the
dialogPrint
dialog.
Default: 1
See also:
dialogPrint
pdMinPage
Sets the lowest page number the user is allowed to set in the
dialogPrint
dialog.
Default: 1
See also:
dialogPrint
pdNoPageNums
Enables/disables the from/to page range controls in the
dialogPrint
dialog.
True = Disables the from/to page range controls.
False = Enables the from/to page controls.
Default: false
See also:
dialogPrint
pdNoSelection
Enables/disables the page selection controls in the
dialogPrint
dialog.
True = Disables the page selection controls.
False = Enables the page selection controls.
Default: false
See also:
dialogPrint
pdPageNums
Deselects/selects the pages radiobutton in the
dialogPrint
dialog.
True = Selects the pages radiobutton.
False = Deselects the pages radiobutton.
Default: false
See also:
dialogPrint
pdPrintToFile
Sets the checkmark of the print to file checkbox in the
dialogPrint
dialog.
True = Set the checkmark on.
False = Set the checkmark off.
Default: false
See also:
dialogPrint
pdReturnDC
Tells the
dialogPrint
method to automatically create a device context handle (hDC) for the printer
that was selected by the user and
save the handle to the hDC property member.
True = Create a device context handle.
False = Do not create a device context handle.
Default: false
See also:
pdReturnIC,
dialogPrint
pdReturnIC
Tells the
dialogPrint
method to automatically create a information context handle (hIC) for the printer
that was selected by the user and
save the handle to the hDC property member.
True = Create an information context handle.
False = Do not create an information context handle.
Note: If both pdReturnIC and pdReturnDC are true,
then pdReturnDC takes priority and a device
context handle will be returned instead of an information context handle.
Default: false
See also:
pdReturnDC,
dialogPrint
pdSelection
Deselects/selects the Selection radiobutton in the
dialogPrint
dialog.
True = Selects the Selection radiobutton.
False = Deselects the Selection radiobutton.
Default: false
See also:
dialogPrint
pdToPage
Sets the value of the to page entryfield in the
dialogPrint
dialog.
Default: 32767
See also:
dialogPrint
pdUseDEVMODECopiesAndCollate
Set this flag to indicate to
dialogPrint
whether you want the printer to handle copies and collating or not.
True = The printer should handle multiple copies and collating.
False = Your application will handle multiple copies and collating.
Default: false
See also:
dialogPrint
pNoNetworkButton
Shows/hides the Network pushbutton in the
dialogPageSetup
and
dialogPrint
dialogs.
True = Hides the Network pushbutton.
False = Shows the Network pushbutton.
Default: false
See also:
dialogPageSetup,
dialogPrint
pNoWarning
Shows/hides the warning message in the
dialogPageSetup
and
dialogPrint
dialogs if no default printer is configured.
True = Hides the warning.
False = Shows the warning.
Default: false
See also:
dialogPageSetup,
dialogPrint
pReturnDefault
Shows/hides the dialogs in the
dialogPageSetup
and
dialogPrint
methods and retrieves all information for the default printer.
True = Hides the dialog.
False = Shows the dialog.
Default: false
See also:
dialogPageSetup,
dialogPrint
psdDisableMargins
Enables/disables the Margin controls in the
dialogPageSetup
dialog.
True = Disables the Margin controls.
False = Enables the Margin controls.
Default: false
See also:
dialogPageSetup
psdDisableOrientation
Enables/disables the Orientation radiobutton controls in the
dialogPageSetup
dialog.
True = Disables the Orientation controls.
False = Enables the Orientation controls.
Default: false
See also:
dialogPageSetup
psdDisablePaper
Enables/disables the Paper controls in the
dialogPageSetup
dialog.
True = Disables the Paper controls.
False = Enables the Paper controls.
Default: false
See also:
dialogPageSetup
psdDisablePrinter
Enables/disables the Printer controls in the
dialogPageSetup
dialog.
True = Disables the Printer controls.
False = Enables the Printer controls.
Default: false
See also:
dialogPageSetup
psdDriver
Indicates the driver name for the currently selected printer.
Default: ""
See also:
psdIsDefault,
psdName,
psdPort
psdInHundredthsOfMillimeters
Tells the
dialogPageSetup
dialog whether to use hundredths of millimeters or thousandths of inches as the
base unit of measure for paper size, margins, etc.
True = The unit of measure is to be in hundredths of millimeters.
False = The unit of measure is in thousandths of inches.
Default: false
See also:
dialogPageSetup
psdIsDefault
Indicates whether the currently selected printer is the system default printer.
True = The printer is the system default printer.
False = The printer is not the system default printer.
Default: false
See also:
psdDriver,
psdName,
psdPort
psdMarginBottom
Sets the value initially displayed and returns the value entered by the user
for the
dialogPageSetup
dialog's bottom margin entryfield.
Default: 0
See also:
dialogPageSetup,
psdMarginLeft,
psdMarginRight,
psdMargins,
psdMarginTop
psdMarginLeft
Sets the value initially displayed and returns the value entered by the user
for the
dialogPageSetup
dialog's left margin entryfield.
Default: 0
See also:
dialogPageSetup,
psdMarginBottom,
psdMarginRight,
psdMargins,
psdMarginTop
psdMarginRight
Sets the value initially displayed and returns the value entered by the user
for the
dialogPageSetup
dialog's right margin entryfield.
Default: 0
See also:
dialogPageSetup,
psdMarginBottom,
psdMarginLeft,
psdMargins,
psdMarginTop
psdMargins
Tells the
dialogPageSetup
dialog whether to use the
psdMargin*
property member values as the initial values for the margin entryfields.
True = Initialize the margin entryfields to the
psdMargin*
property member values.
False = Initialize the margin entryfield values to 1-inch margins.
Default: true
See also:
psdMarginBottom,
psdMarginLeft,
psdMarginRight,
psdMarginTop
psdMarginTop
Sets the value initially displayed and returns the value entered by the user
for the
dialogPageSetup
dialog's top margin entryfield.
Default: 0
See also:
dialogPageSetup,
psdMarginBottom,
psdMarginLeft,
psdMarginRight,
psdMargins
psdMinMarginBottom
Sets the minimum value for the
dialogPageSetup
dialog's bottom margin entryfield.
Default: 0
See also:
dialogPageSetup,
psdMinMarginLeft,
psdMinMarginRight,
psdMinMargins,
psdMinMarginTop
psdMinMarginLeft
Sets the minimum value for the
dialogPageSetup
dialog's left margin entryfield.
Default: 0
See also:
dialogPageSetup,
psdMinMarginBottom,
psdMinMarginRight,
psdMinMargins,
psdMinMarginTop
psdMinMarginRight
Sets the minimum value for the
dialogPageSetup
dialog's right margin entryfield.
Default: 0
See also:
dialogPageSetup,
psdMinMarginBottom,
psdMinMarginLeft,
psdMinMargins,
psdMinMarginTop
psdMinMargins
Tells the
dialogPageSetup
dialog whether to use the
psdMinMargin*
property member values as the minimum values for the margin entryfields.
True = Use the
psdMinMargin*
property member values as the minimums for the margin entryfields.
False = Use the printer's minimum allowable margin settings.
Default: true
See also:
psdMinMarginBottom,
psdMinMarginLeft,
psdMinMarginRight,
psdMinMarginTop
psdMinMarginTop
Sets the minimum value for the
dialogPageSetup
dialog's top margin entryfield.
Default: 0
See also:
dialogPageSetup,
psdMinMarginBottom,
psdMinMarginLeft,
psdMinMarginRight,
psdMinMargins
psdName
Indicates the printer name for the currently selected printer.
Default: ""
See also:
psdIsDefault,
psdDriver,
psdPort
psdPaperSizeX
Indicates the horizontal size of the paper selected by the user after a call to the
dialogPageSetup
method.
Default: 0
See also:
dialogPageSetup,
psdPaperSizeY
psdPaperSizeY
Indicates the vertical size of the paper selected by the user after a call to the
dialogPageSetup
method.
Default: 0
See also:
dialogPageSetup,
psdPaperSizeY
psdPort
Indicates the port name for the currently selected printer.
Default: ""
See also:
psdIsDefault,
psdDriver,
psdName
sysErrorCode
Holds the error code (if any) after a call to the
dialogPageSetup
or
dialogPrint
methods. The
sysErrorCode property member is only valid if either method returns false.
Possible sysErrorCode values are:
1 = Structure size incorrect.
2 = Initialization failure. Most likely due to not enough available memory.
3 = * No template specified.
4 = * No hINSTANCE specified.
5 = * String load failure.
6 = * Find resource failure.
7 = * Resource load failure.
8 = * Resource lock failure.
9 = The dialog box could not allocate required memory.
10 = The dialog box could not lock a block of required memory.
11 = * No hook procedure specified.
4097 = Setup failure.
4098 = Parse faliure.
4099 = Return default failure.
4100 = Load driver failure.
4101 = Get DEVMODE failure.
4102 = Initialization failure.
4103 = No devices.
4104 = No default printer.
4105 = DEVNAME/DEVMODE mismatch.
4106 = Create information context failure.
4107 = Printer not found.
4108 = Default different.
65535 = Dialog failure.
* NOTE: Codes marked with an asterisk should not occur with the jsPrinter class
because the jsPrinter class does not use the functionality that could cause the
error. However, for purposes of completeness, all possible error values are
included here.
Default: 0
See also:
dialogPageSetup,
dialogPrint
version
The version number of the jsPrinter.cc file and jsPrinter class.
This is a character representation of the version in the form "xx.yy" where xx
is the major release sequence and yy is the minor release sequence.
Default: None
xDEVMODE
Holds an object reference to the DEVMODE data structure used by the jsPrinter
class. The DEVMODE structure holds the printer settings selected by the user
after a call to the dialogPrint method. The settings include orientation, copies,
print density, color/monochrome, paper source tray, etc.
A pointer to this DEVMODE structure can
be used in function calls to various API libraries for printing and print
control functions.
Default: xDEVMODE structure object filled with values representing the
system's default printer and settings.
Example:
This example shows a very simple code string that serves the basis for using
jsPrinter to allow the user to select a printer and the printer's settings,
and to print a report using a third-party report engine library.
set procedure to :Nonvisual:jsPrinter.cc additive
oPtr = new jsPrinter(null, "OPTR")
// At this point, the jsPrinter object's property members and xDEVMODE data
// structure are initialized to the system's default printer and print settings.
if not oPtr.dialogPrint()
// The user clicked the Cancel button or an error occurred.
// Must call the release method so that the jsPrinter object can cleanup.
oPtr.release()
RETURN
endIf
// The jsPrinter object's property members and xDEVMODE data structure
// are now set to the user's selection of printer and settings.
// ...
// Additional code here to open and initialize the
// print engine and select the report to print, etc.
// ...
if not RptEngineSetPrinter(hJob, oPtr.psdDriver, oPtr.psdName, oPtr.psdPort, oPtr.xDEVMODE)
// An error occurred, so cleanup and get out.
// Must call the release method so that the jsPrinter object can cleanup.
oPtr.release()
// Additional code to close print job and engine.
RETURN
endIf
// ...
// Additional code here to print the report and cleanup.
// ...
// Must call the release method so that the jsPrinter object can cleanup.
oPtr.release()
RETURN