title: Vue3 window.print() results in 32k pages pdf
body: <p>Im trying to print whole page using pretty simple print function. Currently page displays valid html and it looks good. But I have problem after window.print() execution which wants to print 32079 pages as we can see on attached image.
  What am I missing?</p>
  <p><img src="https://i.imgur.com/aDtoS1k_d.webp?maxwidth=1520&amp;fidelity=grand" alt="Image" /></p>
  <p>Here is my code</p>
  <pre class="lang-js prettyprint-override"><code>      // Html element that i want to print (whole page)
        const prtHtml = document.getElementById('printer').innerHTML;
  
        // Get all stylesheets HTML (using tailwind)
        let stylesHtml = '';
        for (const node of [...document.querySelectorAll('link[rel=&quot;stylesheet&quot;], style')]) {
          stylesHtml += node.outerHTML;
        }
  
        // Open the print window
        const WinPrint = window.open('', '', 'left=0,top=0,width=1200,height=1600,toolbar=0,scrollbars=0,status=0');
  
        WinPrint.document.write(`&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      ${stylesHtml}
    &lt;/head&gt;
    &lt;body&gt;
      ${prtHtml}
    &lt;/body&gt;
  &lt;/html&gt;`);
  
        WinPrint.document.close();
        WinPrint.focus();
        WinPrint.print(); // trying to print 32k pages
  </code></pre>
  <p>Div content:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;div id=&quot;printer&quot; class=&quot;bg-background min-h-screen prose&quot;&gt;
   &lt;div class=&quot;container mx-auto p-4&quot;&gt;
     &lt;div class=&quot;max-w-7xl mx-auto&quot;&gt;
       &lt;router-view /&gt;
     &lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>