title: How to make table center in pdf generated by using TCPDF?
body: <p>I am using TCPDF library to generate a PDF.
  In that I have HEADER image and a table in content area as shown below screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/8OI54.png" alt="enter image description here"></p>
  
  <p>As you are able to see that table is at left of the PDF, i want it to be at center.
  I tried to change the value configuration file<code>(tcpdf_config_alt.php)</code> file by changing value of <code>define ('PDF_MARGIN_LEFT', 5);</code> but what is happening is the header image is also moving to right as in following screenshot.
  <img src="https://i.stack.imgur.com/HHx5N.png" alt="enter image description here"></p>
  
  <p>but what i want is in following screen shot:
  <img src="https://i.stack.imgur.com/XLVhu.png" alt="enter image description here">
  Then I tried to move the table in my html code but still the table doesn't come to center of PDF. The <code>margin-left</code> i given to table is not appied.</p>
  
  <p>HTML code in TCPDF php file:</p>
  
  <pre><code>$tbl =  '&lt;html&gt;';
  $tbl .= '&lt;body&gt;';
  $tbl .= '&lt;table style="margin-top:10px; margin-left:300px;" width="50%" border="1" align="left" cellpadding="5" cellspacing="0"&gt;';
  $tbl .= '&lt;tr&gt;';
  $tbl .= '&lt;td&gt;&lt;b&gt;Agent Name&lt;/b&gt;&lt;/td&gt;';
  $tbl .= '&lt;td&gt;&lt;b&gt;'.$agent_name.'&lt;/b&gt;&lt;/td&gt;';
  $tbl .= '&lt;/tr&gt;';
  $tbl .= '&lt;tr&gt;';
  $tbl .= '&lt;td&gt;&lt;b&gt;Port&lt;/b&gt;&lt;/td&gt;';
  $tbl .= '&lt;td&gt;'.$port.'&lt;/td&gt;';
  $tbl .= '&lt;/tr&gt;';
  $tbl .= '&lt;tr&gt;';
  $tbl .= '&lt;td&gt;&lt;b&gt;Address&lt;/b&gt;&lt;/td&gt;';
  $tbl .= '&lt;td&gt;'.$address.'&lt;/td&gt;';
  $tbl .= '&lt;/tr&gt;';
  $tbl .= '&lt;tr&gt;';
  $tbl .= '&lt;td&gt;&lt;b&gt;Telephone&lt;/b&gt;&lt;/td&gt;';
  $tbl .= '&lt;td&gt;'.$tel.'&lt;/td&gt;';
  $tbl .= '&lt;/tr&gt;';
  $tbl .= '&lt;tr&gt;';
  $tbl .= '&lt;td&gt;&lt;b&gt;Fax&lt;/b&gt;&lt;/td&gt;';
  $tbl .= '&lt;td&gt;'.$fax.'&lt;/td&gt;';
  $tbl .= '&lt;/tr&gt;';
  $tbl .= '&lt;tr&gt;';
  $tbl .= '&lt;td&gt;&lt;b&gt;Contact&lt;/b&gt;&lt;/td&gt;';
  $tbl .= '&lt;td&gt;'.$contact.'&lt;/td&gt;';
  $tbl .= '&lt;/tr&gt;';
  $tbl .= '&lt;tr&gt;';
  $tbl .= '&lt;td&gt;&lt;b&gt;Email ID&lt;/b&gt;&lt;/td&gt;';
  $tbl .= '&lt;td&gt;'.$email_id.'&lt;/td&gt;';
  $tbl .= '&lt;/tr&gt;';
  $tbl .= '&lt;tr&gt;';
  $tbl .= '&lt;td&gt;&lt;b&gt;Website Address&lt;/b&gt;&lt;/td&gt;';
  $tbl .= '&lt;td&gt;'.$website_address.'&lt;/td&gt;';
  $tbl .= '&lt;/tr&gt;';
  $tbl .= '&lt;/table&gt;';
  $tbl .= '&lt;/body&gt;';
  $tbl .= '&lt;/html&gt;';
  </code></pre>
  
  <p>so please can anyone help me to resolve this issue.
  Thanks in advance.</p>