【发布时间】:2021-01-30 13:48:42
【问题描述】:
我已将所有 pdf 的字体大小设置为 10,问题是如果我想在不改变整体字体大小的情况下更改 pdf 特定区域的字体大小,可以做到吗?看下面的代码,我想改变这些区域的字体大小 $pdf->SetXY(17, 80) ;
<?php
require_once('../../bus_partners/fpdf/fpdf/fpdf.php');
require_once('../../bus_partners/fpdf/fpdi/fpdi.php');
$pageCount = $pdf->setSourceFile('../../bus_partners/BIR-forms/2316.pdf') ;
$tplIdx = $pdf->importPage(1, '/MediaBox');
$pdf->SetAutoPageBreak(false) ;
$pdf->addPage('P', 'Legal') ;
$pdf->useTemplate($tplIdx, 8, 12, 200, 320) ;
// setting the font size for the whole page
$pdf->SetFont('Arial');
$pdf->SetFontSize(9);
$pdf->SetTextColor(12, 12, 12);
// Can I set the font size in this specific area only ?
$pdf->SetXY(17, 80) ;
$pdf->Write(0, $address_ee) ;
?>
【问题讨论】: