StartPage, EndPage Commands

Purpose

Starts a new page on a printer device.

Syntax

[Printer.]StartPage

[Printer.]EndPage

Description

StartPage is a method of the Printer object. StartPage must be invoked before printing and is used after a previous EndPage. An output device can be a printer, a fax, a copy machine, etc. any device, the operating system allow to use as a printer.

EndPage is used to mark the end of the page.

Example

OpenW 1

Local h As Handle

Dlg Print Win_1, 40, h

If h <> 0

SetPrinterHDC h

// output to the standard device

Output = Printer : FontSize = 12

StartDoc "test" : StartPage

Print "GFA"

Circle 200, 200, 150

Box 350, 200, 450, 300

EndPage : StartPage

Print "GFA2"

EndPage : EndDoc

Output = Win_1 : Print "Printing finished"

Else

Print "Printing Cancelled"

EndIf

Remarks

StartDoc starts a print job. StartPage prepares the printer driver to accept data. EndPage informs the device that the application has finished writing to a page. The printer spooler realizes the output on the printer. Repeat StartPage/EndPage for the next page. EndDoc ends a print job.

See Also

Printer, Page, EndDoc, StartDoc, StartPage

{Created by Sjouke Hamstra; Last updated: 04/10/2014 by James Gaite}