upload pdf and create link of this pdf in php code example
Example 1: php code add text on existing pdf file
require_once('fpdf.php');require_once('fpdi.php'); function generatePDF($source, $output, $text, $image) { $pdf = new FPDI('Portrait','mm',array(215.9,279.4));
Example 2: add page nos. to existing pdf in php
<?php
require_once('TCPDF/tcpdf.php');
require_once('FPDI/fpdi.php');
$pdf = new FPDI();
$pdf->AddPage();
$pdf->setSourceFile('existing_file.pdf');
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx);
$pdf->SetFont('Courier', '', 10);
$pdf->SetXY(20, 10);
$pdf->Write(0, "Text to be stamped");
$pdf->Output("output_sample.pdf", "D");
?>