Printing functions

PowerScript provides predefined functions that you can use to generate simple and complex lists and reports. Using only three functions, you can create a tabular report in your printer’s default font. Using additional functions, you can create a report with multiple text fonts, character sizes, and styles, as well as lines and pictures.

Table 37-1 lists the functions for printing.

Table 37-1: PowerScript printing functions

Function

Description

Print

There are five Print function formats. You can specify a tab in all but two formats, and in one you can specify two tabs.

PrintBitMap

Prints the specified bitmap.

PrintCancel

Cancels the specified print job.

PrintClose

Sends the current page of a print job to the printer (or spooler) and closes the print job.

PrintDataWindow

Prints the specified DataWindow as a print job.

PrintDefineFont

Defines one of the eight fonts available for a print job.

PrintGetPrinter

Gets the current printer name.

PrintGetPrinters

Gets the list of available printers.

PrintLine

Prints a line of a specified thickness at a specified location.

PrintOpen

Starts the print job and assigns it a print job number.

PrintOval

Prints an oval (or circle) of a specified size at a specified location.

PrintPage

Causes the current page to print and sets up a new blank page.

PrintRect

Prints a rectangle of a specified size at a specified location.

PrintRoundRect

Prints a round rectangle of a specified size at a specified location.

PrintScreen

Prints the screen image as part of a print job.

PrintSend

Sends a specified string directly to the printer.

PrintSetFont

Sets the current font to one of the defined fonts for the current job.

PrintSetPrinter

Sets the printer to use for the next print function call. This function does not affect open jobs.

PrintSetSpacing

Sets a spacing factor to determine the space between lines.

PrintSetup

Calls the printer Setup dialog box and stores the user’s responses in the print driver.

PrintSetupPrinter

Displays the printer setup dialog box.

PrintText

Prints the specified text string at a specified location.

PrintWidth

Returns the width (in thousandths of an inch) of the specified string in the current font of the current print job.

PrintX

Returns the x value of the print cursor.

PrintY

Returns the y value of the print cursor.

For more information about printing functions, see the PowerScript Reference.