title: tables exceeding page margin in tcpdf
body: <p>I'm generating a pdf file using tcpdf , the pdf is contains some long descriptions that the user has already inserted in a textarea (using tinymce). Some users have descriptions with width tables (mostly they just copy/paste from word files to the textarea) , when the pdf is generated these tables exceed the margin and only a part is visible.
  i tried to put it in a div , a table , div inside table, word-break , white-space ,table-layout, display: table ... , fixe the margins in tcpdf... :</p>
  
  <pre><code>$pdf-&gt;SetMargins(10, 30, 5);
  </code></pre>
  
  <p>the latest thing i tried is :</p>
  
  <pre><code>$html = '&lt;style&gt;
      .dd table{
          word-break:break-all;
          white-space:pre-wrap;
          width:650px;
          table-layout:fixed;
          display: table;
          color:red;
      }
  
  &lt;/style&gt;
  
  &lt;div id="dd" class="dd" style="background-color:#ffffff;"&gt; &lt;br /&gt;'.decoder($ligne['description']).'&lt;/div&gt; &lt;br /&gt; &lt;br /&gt;
  ';
  $pdf-&gt;writeHTML($html, true, false, true, false, '');
  </code></pre>
  
  <p>i can change the font color of the tables to red so i know the style is applying, but not the part about not letting it exceed the margin.
  I'm thinking it's because tcpdf is suporting limited css attributes.
  I thought about using writecell instead of writeHTML but their is too much variable text (can be 5 lines or 10 page) , i can't know wheir is starts or where is stops.</p>
  
  <p>Any ideas on how to fit the tables inside the div or table so it won't exceed the margins and doesn't get cut off.</p>
  
  <p>Thank you.</p>