Prints the current document.
Scope: Global
Syntax

Parameter
prompt |
Displays the Print dialog box in which you can specify print options. |
printer x |
Print using printer x. If enclosed in " ", x can include spaces in the printer name. |
driver y |
Print using the y printer driver. If enclosed in " ", y can include spaces in the printer driver name. |
fontsize size |
Print the document using a printer font of size point size. |
visible |
If specified without the off option, print only document lines that are visible in the Editor window. |
selected |
If specified without the off option, print only document lines that are selected. |
tokenized |
If specified without the off option, print document text using token attributes. Results will depend on the capabilities of your printer. |
linenumbers |
If specified without the off option, add document line numbers at the start of each line printed. |
startmargin col |
The number of columns (col ) left as blank space at the beginning of each line, where a column is the average width of a character in the chosen print font. |
copies n |
Print n copies of the document. |
Description
The print command lets you specify how and which text is printed.
Print options, once chosen, remain in effect for the current Editor window until explicitly changed using either the print command or the Print options window. An option not explicitly set with the print command uses, if one exists, a value acquired from a previous print operation. If no value exists from a previous print operation, a value is applied from the following default print options:
printerMost recently-used in the previous Editor window. driverMost recently-used in the previous Editor window. fontsizeMost recently-used in the previous Editor window. visibleoff tokenizedoff linenumbersoff startmargin0 (zero) copies1 (one)
Print options can be initialized for an editing session even if no document is open.
Example
A sample print command:
print printer ibm4201p driver ibm42xx.ibm fontsize 8 visible off tokenized
The printer and driver options are set to specify an IBM Proprinter as the target printer. The document is printed using 8 point character size, all lines are printed, and token attribute highlights are sent to the printer.
API Return Codes
-8 |
Not enough resources to print. |
-4 |
Incorrect parameter specified for print command. |
-1 |
Unable to start PrinterHandler. |
1 |
Printing cancelled by user. |
2 |
No printer selected. |
3 |
No document present to print. |
