尝试使用 PHP 和 TCPDF 创建正确的 PDF 文档。
你能帮我吗,如何使用 writeHTML 函数在 TCPDF 中创建和居中表格?
尝试过:
$html = '
<div style="margin-left: auto; margin-right: auto; width: 50%">
<table border="1" width="200" align="center"><tr><td><b>Invoice number: '.$this->xInvoiceNumber.'</b></td></tr></table>
<br />
<table border="1" width="200" align="center"><tr><td>'.$this->xClient.'</td></tr></table>
<br />
</div>
......但没有运气。