Hi,
in my project I'm using following javascript code to print my page

<script language="javascript" type="text/javascript">
function CallPrint(strid) 
{ 
 var prtContent = document.getElementById(strid); 
 var WinPrint = window.open('','','letf=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status=0'); 
 WinPrint.document.write(prtContent.innerHTML); 
 WinPrint.document.close(); 
 WinPrint.focus(); 
 WinPrint.print(); 
 WinPrint.close(); 
 prtContent.innerHTML=strOldOne; 


}
</script>

Now question is that how can I know printing document is finished ?

I'm not sure if this can be done in JavaScript, because printing involves browser-controlled dialogs and there can be other complications such as the printer being off. You could set a timer and estimate with setInterval() .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.