CLOSEPRINTER

Top  Previous  Next

Syntax

CLOSEPRINTER(handle as UINT)

Description

Closes an open printer. The last page is ended and the document closed.

Parameters

handle - Handle returned by the OPENPRINTER command

Return value

None

Remarks

See Also: OPENPRINTER, WRITEPRINTER, ENDPAGE

Example usage

hPrt = OPENPRINTER(name,"Test Document","TEXT")
IF (hPrt)
    data = "This is a test of printing"
    data = data + chr$(13)
    data = data + "This is line 2"
    WRITEPRINTER hPrt,data
    CLOSEPRINTER hPrt
ENDIF