abortPrint

Abort an in-progress print job.
abortPrint()
This function aborts the currently in-progress print job.

This function can be used in two different ways. It can be called from within the printStatus event handler, typically in response to the user clicking a "cancel" button. After abortPrint is called, the print job will be canceled, and the original printing function (printPDF4, for example) will throw an error.

It can also be called when using the print job API. In this case it should be called in place of the finishJob function. The print job will be canceled, and you will need to call startJob to begin a new print job before you can call printToJob again.

VB:
Private Sub pdf_printStatus(nextPage As Long, firstPage As Long, lastPage As Long) Handles pdf.printStatus If nextPage <= lastPage Then ' about to print "nextPage" Else ' all done printing End If If .... the user pressed the cancel button .... Then pdf.abortPrint() End If End Sub
printStatus