dimanche 8 novembre 2020

If Possible to Read existing PDF content position and add the some content after over the existing content in laravel?

Laravel Package: "setasign/fpdi": "^2.3", "setasign/fpdf": "^1.8"

$pdf = new \setasign\Fpdi\Fpdi('L','mm','A4');
$pageCount = $pdf->setSourceFile(public_path().'/'.$url);
$pdf->setFont('Arial', 'B', 10);
for($i = 1; $i <= $pageCount; $i++){
    $tplIdx = $pdf->importPage($i);
    $pageDimensions = $pdf->getImportedPageSize($tplIdx);
    $pdf->addPage($pageDimensions['orientation'], $pageDimensions);
    $pdf->useTemplate($tplIdx);
 }

If It Possible read the content of the last page and get after page content ordinate of the current position. then Write new content without add new page or whitespaces



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire