Printing a job

PrintOpen must be the first function call in every print job. The PrintOpen function defines a new blank page in memory, specifies that all printing be done in the printer's default font, and returns an integer. The integer is the print job number that is used to identify the job in all other function calls.

PrintOpen is followed by calls to one or more other printing functions, and then the job is ended with a PrintClose (or PrintCancel) call. The functions you call between the PrintOpen call and the PrintClose call can be simple print functions that print a string with or without tabs, or more complex functions that add lines and objects to the report or even include a picture in the report.

Printing titles

To print a title at the top of each page, keep count of the number of lines printed, and when the count reaches a certain number (such as 50), call the PrintPage function, reset the counter, and print the title.

Here is a simple print request:

Int PrintJobNumber
// Start the print job and set PrintJobNumber to
// the integer returned by PrintOpen.
PrintJobNumber = PrintOpen()
// Print the string Atlanta.
Print(PrintJobNumber,"Atlanta")
// Close the job.
PrintClose(PrintJobNumber)