php-pdftk icon indicating copy to clipboard operation
php-pdftk copied to clipboard

PDF Overlay

Open jayomayan opened this issue 2 years ago • 3 comments

Not sure what's wrong with this but i just followed the docs.

$file_name='original.pdf';
$overlay='overlay.pdf';

$pdf = new \mikehaertl\pdftk\Pdf($file_name);
$result = $pdf->stamp($overlay)
    ->saveAs('merge.pdf');

if ($result === false) {
    $error = $pdf->getError();
}

It does not overlay, no output file created. Any help would be much appreciated.

jayomayan avatar Sep 15 '23 21:09 jayomayan

What about $error? Does it contain something?

mikehaertl avatar Sep 16 '23 06:09 mikehaertl

sorry took a long time to response.. but no error.. the result = 1.

jayomayan avatar Jul 17 '24 17:07 jayomayan

Hmm, no idea then. I would try on the command line with raw pdftk (without this library at all). Just to find out if it works in principle.

mikehaertl avatar Jul 17 '24 17:07 mikehaertl