【问题标题】:fpdi - Add content to the existing pdf but the existing content is moving outfpdi - 向现有 pdf 添加内容,但现有内容正在移出
【发布时间】:2016-11-23 09:28:06
【问题描述】:

我正在使用 fpdi 在已包含一些内容的现有 pdf 文件中添加内容。一旦我添加了内容,现有内容就会移出(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');

【问题讨论】:

    标签: php pdf fpdf fpdi


    【解决方案1】:

    我已经添加了参数,po

    $pdf->AddPage("P", "Letter");
    

    【讨论】:

      猜你喜欢
      • 2011-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-29
      • 2015-07-15
      相关资源
      最近更新 更多