Php 如何在fpdf中使数组的元素加粗?
我正在使用fpdf 我想让数组中的一个元素看起来粗体Php 如何在fpdf中使数组的元素加粗?,php,fpdf,Php,Fpdf,我正在使用fpdf 我想让数组中的一个元素看起来粗体 $cell3[8][0] = 'Improved Yield : Farmer Business School Training'; 分配完所有这些值后,我将在pdf文档中打印它们 $pdf->FancyTable_2c($head3,$cell3); $pdf->Cell(8,5,'',0,1); 如何做到这一点?使用。style参数就是您要查找的参数。您需要设置所需的字体,然后添加单元格,然后更改回样式: //declar
$cell3[8][0] = 'Improved Yield : Farmer Business School Training';
分配完所有这些值后,我将在pdf文档中打印它们
$pdf->FancyTable_2c($head3,$cell3);
$pdf->Cell(8,5,'',0,1);
如何做到这一点?使用。
style
参数就是您要查找的参数。您需要设置所需的字体,然后添加单元格,然后更改回样式:
//declare a style
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(20,10,"This will be regular Arial");
//declare another style, overwrites previous one
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(20,10,"This will be Arial Bold");
//set it back to normal
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(20,10,"This will be regular Arial once more")
希望能有所帮助您需要别人为您编码吗?尝试一些东西,发布它,你会得到更好的反馈嗨,马特,我试图在pdf中显示,单元格(数组)中一个元素的粗体文本。不是所有的元素,只有一个元素我想加粗。这是一种副标题。