【问题标题】:TCPDF font spacing too wideTCPDF 字体间距太宽
【发布时间】:2013-10-03 17:08:36
【问题描述】:

我有这个过去有效的代码:

$pdf = new TCPDF('L', 'In', 'LETTER', true); 
$pdf->SetPrintHeader(false);    
$pdf->SetPrintFooter(false);    
$pdf->SetFont('Times','B',11);
$pdf->AddPage();
$pdf->SetLeftMargin(0.5);
$pdf->SetLineWidth(.04);
$pdf->Rect(.5, .5, 10, 7.5);
$pdf->SetLineWidth(.01);
$pdf->Rect(.55, .55, 9.89, 7.39);
$pdf->setFont('Times', 'BI', 31);
$pdf->SetXY(0.5,0.9);
$pdf->Cell( 9.75, 0.5, 'Certificate of Completion',0,1,'C');
$pdf->setFont('Helvetica', 'B', 11);
$pdf->SetXY(0.5,1.75);
$pdf->Cell( 9.75, 0.2, 'Course Work or Training in Infection Control',0,1,'C');
$pdf->Cell( 9.75, 0.2, 'Approved by', 0, 1, 'C');
$pdf->Cell( 9.75, 0.2, 'The New York State Department of Health &', 0, 1, 'C');
$pdf->Cell( 9.75, 0.2, 'The New York State Department of Education', 0, 1, 'C');

现在输出如下所示:

我尝试添加这个:

$pdf->setFontSpacing(100);  

但脚本执行失败。

怎么了?

【问题讨论】:

    标签: php pdf pdf-generation tcpdf


    【解决方案1】:

    网站上的 TCPDF 版本太旧了。

    我更新到最新版本,问题就消失了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-08
      相关资源
      最近更新 更多