title: Wkhtmltopdf Table Overflow Horizontally Auto Page Break
body: <p>I am using Wicked PDF that uses Wkhtmltopdf 0.9.9.1 via wkhtmltopdf-binary gem.
  I have a table as described below (simplified)</p>
  
  <pre><code>&lt;div id="listing"&gt;
       &lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
       &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and style as described below (simplified)</p>
  
  <pre><code> &lt;style&gt;
      #listing table tr td {
          width:200mm !important
      }
      #listing {
          width:210mm;
          height:297mm;
          page-break-inside:auto;
      }
    &lt;/style&gt;
  </code></pre>
  
  <p>Since the there are 4 cells, each 200mm in width, the table should overflow to the right of the container (container's width is A4 standard width = 210 mm )</p>
  
  <p>Why is it that the table never gets broken into 2 pages?
  I have followed some links related to it, but still get no good progress.
  Is it the case that Wkhtmltopdf does not support page break for horizontal overflowing?
  I really appreciate for some pointers.</p>
  
  <p><strong>ADDED INFO:</strong></p>
  
  <p>The whole thing simply shrinks to fit the table (auto-scaled). When I added rule "overflow:hidden", the table gets cut-off without being continued to the next page.</p>
  
  <p>The intended behavior is :</p>
  
  <ol>
  <li>When the table overflows vertically, table gets continued on the next page.</li>
  <li>When the table overflows horizontally, table gets continued on the next page.</li>
  <li>When the table overflows in both direction, table gets continued on the next pages. Which one comes first (overflowed right side or bottom side) is not important, as long as both extra will come in the following pages.</li>
  </ol>
  
  <p>If Wkhtmltopdf is not the correct tool for this, I would be glad to know some workaround (if any) or to know the best tool for this. Thank you.</p>