WaitForSpoolingComplete
Description
Waits for all pending download and spooling operations originated with Print, PrintHTML and BatchPrintPDF calls to complete. WaitForSpoolingComplete provides visual feedback such as a modal window state and an hourglass cursor.
Do NOT use in server/servce printing scenarios. WaitForSpoolingComplete() calls the Windows message pump and will cause the server thread to block.
Syntax
printing.WaitForSpoolingComplete()
Return Value
Returns a boolean value indicating whether or not there are still outstanding unspooled downloads to be printed.
Example
Check out the source code of the ScriptX Techie Printing example.
<script>
function PrintAndGo() {
if ( factory.printing.Print() )
factory.printing.WaitForSpoolingComplete()
window.close()
}
</script>
Applies To
printing
See Also
onafterprint, onbeforeunload
BatchPrintPDF, IsSpooling, OwnQueue, Print, PrintHTML, Sleep