Stopping a print job – PB Docs 70

Stopping a print job

There are two ways to stop a print job. The normal way is
to close the job by calling the PrintClose function at the end of
the print job. The other way is to cancel the job by calling PrintCancel.

Using PrintClose

PrintClose sends the current page to the printer or spooler,
closes the print job, and activates the window from which the printing
started. After you execute a PrintClose function call, any function
calls that refer to the job number will fail.

Using PrintCancel

PrintCancel ends the print job and deletes any output that
has not been printed. The PrintCancel function provides a way for
the user to cancel printing before the process is complete. A common
way to use PrintCancel is to define a global variable and then check
the variable periodically while processing the print job.

Assume StopPrint is a boolean global variable. The following
statements check the StopPrint global variable and cancel the job
when the value of StopPrint is TRUE:

Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x