Description
The START message controls the printer device to be used and print job name for each printing session. The START message must be called for each print job. Every START message must have a matching STOP message. The START message may also be used to send the print job to a file instead of a printer.
Parameters | Description of Fields | Comments | Default |
---|---|---|---|
Parm1 | Device Name | The printer name | Local Default Printer |
Parm 2 | Filename | Contains the print job name or if creating a print file the full path and filename of the print file. | "" |
Parm 3 | Create Print File | A boolean value. If true then the job will printed to file using the path and filename specified in parm2. | "" |
See also
PRINTBIN Direct_Print() message
Example
Subroutine Direct_Print_Example(startValue) Declare Function Direct_Print, Unassigned If Unassigned(startValue) Then startValue = '' Equ HP_Bold$ To char(27):'(s3B' Equ HP_Norm$ To char(27):'(s-5B' * This case statement contains the various START options Begin Case Case startValue = '' retval = Direct_Print('START','','','') ; * print to default printer Case startValue = 'ToFile' retval = Direct_Print('START','','C:\TEMP\DIRECT_PRINT_EXAMPLE.TXT',1) ; * Print To file Case startValue = 'Different_Printer' retval = Direct_Print('START','HP LaserJet 2200 Series PCL 6','','') ; * print to a specific printer End case If retval < 1 then Goto ErrorHandler * Print 30 lines of bold text For i = 1 To 30 retval = Direct_Print('PRINT',HP_Bold$:'This first page contains bold text.') If retval < 1 then Goto ErrorHandler Next i retval = Direct_Print('PAGE') ; * Force page break If retval < 1 then Goto ErrorHandler For i = 1 To 30 retval = Direct_Print('PRINT',HP_Norm$:'This page contains plain text.') If retval < 1 then Goto ErrorHandler Next i retval = Direct_Print('PAGE') ; * Force page break If retval < 1 then Goto ErrorHandler retval = Direct_Print('PRINT','This page contains concatenated text.',0) If retval < 1 then Goto ErrorHandler retval = Direct_Print('PRINT','This page contains concatenated text.',1) If retval < 1 then Goto ErrorHandler * End the Print Job retval = Direct_Print('STOP') ErrorHandler: If retval < 1 Then Swap @fm With @vm In retval call Msg(@Window,'ERROR':retval) retval = Direct_Print('ABORT') End Return