title: Print PDF File in IFrame using javascript getting one page only
body: <p>here is my code to print a pdf file. here while printing time iam getting one page only i need a solution for that</p>
  
  <pre><code>  function printPdf(){
       var ifr = document.getElementById("frame1");
           //PDF is completely loaded. (.load() wasn't working properly with PDFs)
       ifr.onreadystatechange = function () {
          if (ifr.readyState == 'complete') {
                ifr.contentWindow.focus();
                ifr.contentWindow.print();
             }
         }
   }
  </code></pre>