title: TCPDF writeHTML margin/padding styling not working
body: <p>I have implemented TCPDF in my Magento 2 application. What I did was to create an HTML file and load it into my TCPDF instance in my controller. I added all the styling as inline style in my HTML markup. But upon loading the styling is not being recognized. Not sure what but other styling like background color and font size is working just fine. But when I try to add a margin or padding in my Div tag its still not taking effect. Any idea how I can load my HTML and load the css as well? Below is my HTML markup and my tcpdf code in my controller</p>
  
  <blockquote>
    <p>HTML MARKUP</p>
  </blockquote>
  
  <pre><code>    $pdf = new \TCPDF(self::PAGE_ORIENTATION, self::PAGE_UNIT, [self::PAGE_SIZE_WIDTH, self::PAGE_SIZE_HEIGHT], true, 'UTF-8', false);
      $pdf-&gt;SetCreator("Creator");
      $pdf-&gt;SetAuthor('Author');
      $pdf-&gt;SetTitle('Print');
      $pdf-&gt;SetSubject('PDF');
      $pdf-&gt;SetKeywords('pdf);
  
      // set some language-dependent strings (optional)
      if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
          require_once(dirname(__FILE__).'/lang/eng.php');
          $pdf-&gt;setLanguageArray($l);
      }
  
      // remove default header/footer
  
      $pdf-&gt;SetMargins(0, 0, 0, 0);
      $pdf-&gt;SetAutoPageBreak(TRUE, 0);
      $pdf-&gt;setCellPaddings(0,0,0,0);
      $pdf-&gt;setFooterMargin(0);
      $pdf-&gt;setPrintHeader(false);
      $pdf-&gt;setPrintFooter(false);
      $pdf-&gt;AddPage();
      $html = &lt;&lt;&lt;EOF
      &lt;div id="ecard-container"&gt;
          &lt;table cellspacing="0" cellpadding="0"&gt;
              &lt;tr&gt;
                  &lt;td width="333" bgcolor="#6FFF66" height="270"&gt;
                      &lt;div&gt;
                          &lt;img src="{$img}" width="220" height="270"/&gt;
                      &lt;/div&gt;
                  &lt;/td&gt;
                  &lt;td bgcolor="#990000" height="270"&gt;
                      &lt;table&gt;
                          &lt;tr&gt;
                              &lt;td&gt;
                                  &lt;div class="top-container"&gt;
                                      &lt;h1&gt;The title&lt;/h1&gt;
                                      &lt;div&gt;Bought in your name from Gifts&lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td&gt;Lorem Ipsum&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;                
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td valign="bottom" bgcolor="#FFFFF0"&gt;
                      &lt;div class="title" style="display: block;margin: 30px;"&gt;Thank you for saving a life today by providing medicine for a sick person in the developing world&lt;/div&gt;
                  &lt;/td&gt;
                  &lt;td bgcolor="#CCCCCC" height="70"&gt;
                      &lt;table&gt;
                          &lt;tr&gt;
                              &lt;td style="margin: 0.3in;padding: 0.3in;"&gt;
                                  &lt;div class="message"&gt;&lt;/div&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td&gt;
                                  &lt;span&gt;Order number: 100051905&lt;/span&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td&gt;
                                  &lt;div&gt;More info at www.goodgifts.org.&lt;/div&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td&gt;
                                  &lt;div&gt;Tel: 020 7794 8000&lt;/div&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
      EOF;
      $pdf-&gt;writeHTML($html, true, false, true, false, '');   
  </code></pre>
  
  <p>Now I tried adding inline style in my HTML tags like adding padding or margin but it's not taking effect. I also tried viewing it in Incognito but to no avail. Any idea on how to fix this?</p>