【发布时间】:2023-03-06 19:16:02
【问题描述】:
我正在尝试使用 HTML 代码使用 TCPDF 制作 PDF 文档。
目前我使用此代码:
// set font
$pdf->SetFont('dejavusans', '', 36);
// add a page
$pdf->AddPage();
$html = '
<style>
.h1 {
color: #2B6999;
font-weight: normal;
}
</style>
<h1 class="h1">Test</h1>
';
// output the HTML content
$pdf->writeHTML($html, true, false, true, false, 'C');
如何定位此文本?我不能在标签 margin-top 等之间使用。
谁能帮我解决这个问题?
【问题讨论】: