title: TCPDF - How can I show a div with absolute position in a pdf created with tcpdf?
body: <p>I have following tcpdf code:</p>
  
  <pre><code>    &lt;?php
      require_once('config/lang/eng.php');
      require_once('tcpdf.php');
  
      // Extend the TCPDF class to create custom Header and Footer
      class MYPDF extends TCPDF {
  
        //Page header
        public function Header() {
        }
  
        // Page footer
        public function Footer() {
        }
      }
  
      // create new PDF document
      $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
  
      // set document information
      $pdf-&gt;SetCreator(PDF_CREATOR);
      $pdf-&gt;SetAuthor('Stimart');
      $pdf-&gt;SetTitle('test');
      $pdf-&gt;SetSubject('test');
      $pdf-&gt;SetKeywords('test');
  
      // set default header data
      $pdf-&gt;SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
  
      // set header and footer fonts
      $pdf-&gt;setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
      $pdf-&gt;setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
  
      // set default monospaced font
      $pdf-&gt;SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
  
      //set margins
      $pdf-&gt;SetMargins(40, 40, PDF_MARGIN_RIGHT);
      $pdf-&gt;SetHeaderMargin(PDF_MARGIN_HEADER);
      $pdf-&gt;SetFooterMargin(PDF_MARGIN_FOOTER);
  
      //set auto page breaks
      $pdf-&gt;SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
  
      //set image scale factor
      $pdf-&gt;setImageScale(PDF_IMAGE_SCALE_RATIO);
  
      //set some language-dependent strings
      $pdf-&gt;setLanguageArray($l);
  
      // ---------------------------------------------------------
  
      // set font
      $pdf-&gt;SetFont('times', '', 12);
  
      // add a page
      $pdf-&gt;AddPage();
  
      // set some text to print
      $html = '&lt;div style="position: absolute; top:200px; left:300px;"&gt;Hi, I am an ABSOLUTE div.&lt;/div&gt;';
  
      $pdf-&gt;writeHTML($html, true, false, false, false, '');
      // ---------------------------------------------------------
      $pdf-&gt;lastPage();
      //Close and output PDF document
      $pdf-&gt;Output('test.pdf', 'I');
  
      //============================================================+
      // END OF FILE                                                
      //============================================================+
  </code></pre>
  
  <p>after the line "// set some text to print" I set up the html code to show but it doesn't works as expected.
  In this case I need to pass a div with absolute position but when the code runs it creates the pdf page showing the div in relative position.</p>
  
  <p>How can I solve this annoying problem??</p>