PC_PRINTER_OPEN

Opens a printer channel, giving it a document title, and optionally displaying printer control, font, and progress indicator dialog boxes

Syntax:

call "PC_PRINTER_OPEN" using     printer-handle
                                 document-title
                       by value  flags
                       by value  window-handle
                       returning status-code

Parameters

printer-handle
Call prototype (see Key): cblt-x4-comp5
Picture: pic x(4) comp-5.
document-title
Group predefined as cblt-printer-name containing:
01 cblt-printer-name       typedef.
  03 cblte-pn-name-length  cblt-x2-comp5. *> pic x(2) comp-5.
  03 cblte-pn-name         cblt-x1.       *> Occurs depending on
                                          *> cblte-pn-name-length.  pic x(n).
flags
Call prototype (see Key): cblt-x4-comp5
Picture: pic x(4) comp-5.
window-handle
Call prototype (see Key): Numeric literal or cblt-x4-comp5
Picture: Numeric literal or pic x(4) comp-5.
status-code
See Library Routines - Key.

On Entry:

cblte-pn-name-length The length of the document title
cblte-pn-name The title of the document to be printed
flags A set of bits to define printer options:
Bit 0
Display a printer control dialog to allow you to define the printer characteristics (cannot be used with bit 2 or bit 3)
Bit 1
Display a font dialog box to allow you to define the default font for the document
Bit 2
Print in portrait orientation (cannot be used with bit 0 or bit 3)
Bit 3
Print in landscape orientation (cannot be used with bit 0 or bit 2)
Bit 4
Display a progress indicator dialog box

All remaining bits are reserved for future use and should not be set

window-handle Handle of parent window to use for positioning of dialog boxes. If handle is 0 the dialog boxes will be positioned in a system-dependent position on the screen.
printer-handle Returns a handle to be used for subsequent printer operations for a successful open.

On Exit:

printer-handle Returns a handle to be used for subsequent printer operations for a successful open.
status-code Printer Handling Routines Return Codes