title: Print all data in multiple page pagination
body: <p>I have problem to print all data in data table that have pagination. I have already do research and found this same question in this link</p>
  
  <p><a href="https://stackoverflow.com/questions/468881/print-div-id-printarea-div-only">Print &lt;div id=&quot;printarea&quot;&gt;&lt;/div&gt; only?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/8823575/printing-multiple-pages-with-javascript">Printing multiple pages with Javascript</a></p>
  
  <p>but some of the coding wont work in my project or maybe i dont understand the coding.</p>
  
  <p>this is the example coding that i already tried..so basically i have 19 data in the database ..but in this page i limit it to 15</p>
  
  <p><a href="https://i.stack.imgur.com/gVdBp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gVdBp.jpg" alt="example"></a></p>
  
  <p>so when i click button print i dont have to go to every page to print all the data in data table.</p>
  
  <p>this is the code that i use for button print</p>
  
  <pre><code>&lt;div id="printableArea"&gt;
    &lt;h1&gt;Print me&lt;/h1&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <p><strong>Javascript</strong> </p>
  
  <pre><code>function printDiv(divName) {
   var printContents = document.getElementById(divName).innerHTML;
   var originalContents = document.body.innerHTML;
  
   document.body.innerHTML = printContents;
  
   window.print();
  
   document.body.innerHTML = originalContents;
  }
  </code></pre>