title: Multipage landscape printing with wkhtmltopdf and PDFKit
body: <p>I run a web-based timeline maker and one of the most requested features is to allow users to print their timeline across multiple sheets of paper instead of squeezing it onto a single sheet.</p>
  
  <p>For example, right now when a user exports his or her timeline to a PDF, it gets compressed onto a single page with landscape orientation so it can be easily printed:</p>
  
  <p><img src="https://i.stack.imgur.com/pgYrh.png" alt="enter image description here"></p>
  
  <p>I've been experimenting with the options in PDFKit (which uses wkhtmltopdf behind the scenes) to adjust the page size in the hope that it would allow me to print it across multiple sheets of paper. I was able to generate the same timeline on a single 36" wide page:</p>
  
  <p><img src="https://i.stack.imgur.com/AC7B4.png" alt="enter image description here"></p>
  
  <p>What I can't figure out -- and I'm not sure if I need to adjust wkhtmltopdf's properties or my printer's -- is how to print this 36"-wide PDF page across multiple sheets of paper. No matter what settings I adjust, the printer always tries to print it on a single piece of paper:</p>
  
  <p><img src="https://i.stack.imgur.com/wMaTB.png" alt="enter image description here"></p>
  
  <p>The code I use to generate the 36"-wide PDF, in case it's important, is:</p>
  
  <pre><code>    kit = PDFKit.new(html,
        :margin_top =&gt; 5,
        :margin_right =&gt; 0,
        :margin_bottom =&gt; 20,
        :margin_left =&gt; 0,
        :orientation =&gt; 'landscape',
        :encoding =&gt; "UTF-8",
        :page_width =&gt; '7in',
        :page_height =&gt; '36in',
      )
  </code></pre>
  
  <p>You can download the PDF <a href="http://cl.ly/321X2A0r2q11" rel="nofollow noreferrer">here</a>.</p>
  
  <p>I'm open to ideas. Any feedback would be greatly appreciated. Thank you!</p>