2016-11-23 41 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"); 
相關問題