PrintClose PowerScript function
Description
Sends the current page to the printer (or spooler) and closes
the job. Call PrintClose as the last command
of a print job unless PrintCancel function has closed
the job.
Syntax
1 |
<span>PrintClose</span> ( <span>printjobnumber</span> ) |
Argument |
Description |
---|---|
printjobnumber |
The number the PrintOpen function |
Return Values
Integer. Returns 1 if it succeeds and
-1 if an error occurs. If printjobnumber is null, PrintClose returns null.
Usage
When you open a print job, you must close (or cancel) it.
To avoid hung print jobs, process and close a print job in the same
event in which you open it.
Examples
This example opens a print job, which creates a blank
page, prints a bitmap on the page, then sends the current page to
the printer or spooler and closes the job:
1 |
ulong Job |
1 |
1 |
// Begin a new job and a new page. |
1 |
Job = PrintOpen( ) |
1 |
1 |
// Print the bitmap in its original size. |
1 |
PrintBitmap(Job, d:PBBITMAP1, 5,10, 0,0) |
1 |
1 |
// Send the page to the printer and close Job. |
1 |
<span>PrintClose</span>(Job) |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest