title: Printing a multi-page HTML5 canvas element
body: <p>This is the first question I've ever asked on here, as normally I can find an answer that will solve all my problems. However, this week I've hit quite the wall. </p>
  
  <p>I'm using a canvas on my page that's working great and can be saved as an image file. I've also created a button that will open the canvas in a new window for printing after using toDataURL. I'm using the code below:</p>
  
  <pre><code>function printable() {
      var dataUrl = document.getElementById("mainCanvas").toDataURL("image/png");
      var windowContent = '&lt;!DOCTYPE html&gt;';
      windowContent += '&lt;head&gt;&lt;title&gt;Print Map&lt;/title&gt;&lt;/head&gt;';
      windowContent += '&lt;body&gt;';
      windowContent += '&lt;img src = "' + dataUrl + '"&gt;';
      windowContent += '&lt;/body&gt;';
      windowContent += '&lt;/html&gt;';
      var printWin = window.open('', '', width = 340, height = 260);
      printWin.document.open();
      printWin.document.write(windowContent);
      printWin.document.close();
      printWin.focus();
      printWin.print();
  }
  </code></pre>
  
  <p>This works great and opens the print dialogue to print my canvas image. My issue is that my image is larger than a single page and only the first page of my image prints. Is there any way to print my canvas across multiple pages, or should i just chalk this up to bad browser to printer functionality and get my users who need to print to use a different program after saving their canvas locally?</p>
  
  <p>Thanks</p>