如何编辑已上传的pdf文件


How can I edit a pdf file which has already been uploaded?

我想为服务器上的pdf文件添加页脚。


我已将文件上传到上传/aaa.pdf
我想在文件上传/aaa 中添加页脚.pdf

我该怎么做?

这项工作

require_once('fpdf.php');
require_once('fpdi.php');
$pdf =& new FPDI();
$pdf->AddPage();
//Set the source PDF file
$pagecount = $pdf->setSourceFile(“Tally_PO.pdf”);
//Import the first page of the file
$tppl = $pdf->importPage(1);
//Use this page as template
// use the imported page and place it at point 20,30 with a width of 170 mm
$pdf->useTemplate($tppl, -10, 20, 210);
#Print Hello World at the bottom of the page
//Select Arial italic 8
$pdf->SetFont(‘Arial’,”,8);
$pdf->SetTextColor(0,0,0);
$pdf->SetXY(90, 160);
$pdf->Write(0, “Hello World”);
$pdf->Output(“modified_pdf.pdf”, “F”);

指称 : http://pranavom.wordpress.com/2011/03/15/modify-pdf-using-fpdffpdi-library/