Loading...
 

PrintDocument

PrintDocument

PrintDocument

Stack
Stack Position Description
Stack(In) Top a document object
Stack(Out) Top -

The document is printed using the printer set in the document. If no printer is set, the document is printed using the default printer.

This command has the same effect as the PrintToPrinter function call of the document object.

Note: The document can no longer be exported with ExportDocument afterwards.

Example:

Var(printDoc)

SetPrinter ifnot return

Document(60, 5) -> printDoc

[ 5, 2, printDoc , HEADER, T("Umsatzsteuervoranmeldung von ", "Advanced VAT statement of ")] PutLine
[ printDoc , HEADER, cyberEnterprise Copy(partner.name) ] PutLine

[ printDoc Dup Page 1 + String ] PutLine

printDoc PrintDocument

Alternatively:

Var(printDoc, printJob)

SetPrinter ifnot return

Document(60, 5) -> printDoc

[ 5, 2, printDoc , HEADER, T("Umsatzsteuervoranmeldung von ", "Advanced VAT statement of ")] PutLine
[ printDoc , HEADER, cyberEnterprise Copy(partner.name) ] PutLine

[ printDoc Dup Page 1 + String ] PutLine

printDoc Call(PrintToPrinter)