title: TCPDF: writeHTML ignores margin right definition
body: <p>I use the <code>writeHTML()</code> function in TCPDF to write HTML using <code>setPageRegions()</code> function so it floats around a picture. It works fine. But the only problem I have is, the text is going to the very right end of the page.</p>
  
  <p>I set the margins with <code>SetMargins(20, 20, 20)</code> and I also set the margins and with of the html container with the style attribute, but it ignores it all.</p>
  
  <p>How can i get the text width a margin on the right side. Left side is fine.</p>
  
  <p>This is my code:</p>
  
  <pre><code>$pdf-&gt;SetMargins( 20, 20);
  $pdf-&gt;Image( $img, 25, 80, 100, 128, 'JPEG', '', 'N', 0);
  $txt = "&lt;p style=\"width:380px;margin-right:20px;text-align:justify;color:rgb( 54,111,148);font-size:12pt;line-height:1px;\"&gt;... my long text ...&lt;/p&gt;";
  $pdf-&gt;SetXY( 25, 80);
  $regions = array( array( 'page' =&gt; '', 'xt' =&gt; 135, 'yt' =&gt;  80, 'xb' =&gt; 135, 'yb' =&gt;  215, 'side' =&gt; 'L')); // the region where the picture is located incl. paddings
  $pdf-&gt;setPageRegions( $regions);
  $pdf-&gt;writeHTML( $txt, true, false, true, false, '');
  </code></pre>
  
  <p>Thanks for any help.</p>