IsSpooling
Description
Checks if spooling is in progress as result of a Print call, or for any downloads outstanding in the queue created by PrintHTML, or BatchPrintPDF calls.
You can force the blocking wait state with WaitForSpoolingComplete to make sure all downloads are complete and spooling is done at any point in your code.
Syntax
isSpooling = printing.IsSpooling()
Return Value
Returns a boolean value indicating whether or not there are still outstanding unspooled downloads to be printed
Example
The following example closes the window when the spooling is done:
<script defer>
function PrintAllDocs() {
factory.printing.PrintHTML("info.htm");
factory.printing.PrintHTML(src1);
factory.printing.PrintHTML(src2);
CheckSpooling();
}
function CheckSpooling() {
if ( !factory.printing.IsSpooling() ) window.close()
setTimeout("CheckSpooling()", 1000);
}
</script>
See Also
onafterprint, onbeforeunload
BatchPrintPDF, OwnQueue, Print, PrintHTML, Sleep, WaitForSpoolingComplete