3

I am using fpdf I want to make an element of an array look bold.

$cell3[8][0] = 'Improved Yield : Farmer Business School Training';

After Assigning all those values I will print them in pdf document

$pdf->FancyTable_2c($head3,$cell3);
$pdf->Cell(8,5,'',0,1);

How to do this?

4

2 回答 2

7

您需要设置所需的字体,然后添加单元格,然后将样式改回:

//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")

希望能帮助到你

于 2013-06-22T11:09:38.537 回答
1

使用SetFont. 该style参数是您正在寻找的。

于 2013-03-19T18:32:54.433 回答