如何使用 PHP 在我的 FPDF 文件中添加行高
how to add line height in my FPDF file using PHP
我在下面的代码中遇到了一个小问题
<?php
require('fpdf17/fpdf.php');
//A4 width : 219mm
//default margin : 10mm each side
//writable horizontal : 219-(10*2)=189mm
$pdf = new FPDF('P','mm','A4');
$pdf->AddPage();
//set font to arial, bold, 14pt
$pdf->SetFont('Arial','B',14);
//Cell(width , height , text , border , end line , [align] )
$pdf->Cell(200 ,5,'National Remote Sensing Center',1,1,'C');
$pdf->Cell(50 ,5,'Flight REquisition Form',1,1,'C');
我有一个标题和一个副标题。但我需要它们之间有一些线高。谁能告诉行高调整的代码?
提前致谢。
你能不能只使用 Cell() 方法的第二个参数... 高度?
Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]])
h
Cell height. Default value: 0.
来自 http://www.fpdf.org/ > 手册 > Cell()
我在下面的代码中遇到了一个小问题
<?php
require('fpdf17/fpdf.php');
//A4 width : 219mm
//default margin : 10mm each side
//writable horizontal : 219-(10*2)=189mm
$pdf = new FPDF('P','mm','A4');
$pdf->AddPage();
//set font to arial, bold, 14pt
$pdf->SetFont('Arial','B',14);
//Cell(width , height , text , border , end line , [align] )
$pdf->Cell(200 ,5,'National Remote Sensing Center',1,1,'C');
$pdf->Cell(50 ,5,'Flight REquisition Form',1,1,'C');
我有一个标题和一个副标题。但我需要它们之间有一些线高。谁能告诉行高调整的代码? 提前致谢。
你能不能只使用 Cell() 方法的第二个参数... 高度?
Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]])
h
Cell height. Default value: 0.
来自 http://www.fpdf.org/ > 手册 > Cell()