2016-11-23 40 views
0

我正在使用fpdi在已经有一些内容的现有pdf文件中添加内容。一旦我添加内容,现有的内容正在移出(PDF文件的长度正在增加)。请帮我解决这个问题。fpdi - 将内容添加到现有的pdf中,但现有的内容正在移出

$pdf =& new FPDI(); 
$pdf->AddPage(); 

$pdf->setSourceFile($filename); 
$tplIdx = $pdf->importPage(1); 
$pdf->useTemplate($tplIdx, 0, 0, 0, 0, true); 

$pdf->SetFont('Arial','B',16); 
$pdf->Cell(40,10,'My content abc',0,2); 
$pdf->Cell(40,10,'My content2 abc',0,2); 
$pdfGeneration=$pdf->Output('F',$_SERVER["DOCUMENT_ROOT"].'mypath/newwrited.pdf'); 

回答

0

我已经添加了参数,PO

$pdf->AddPage("P", "Letter"); 
相关问题