php-pdf-merge icon indicating copy to clipboard operation
php-pdf-merge copied to clipboard

Error when setting the pages to be merged

Open vahiddabbagh opened this issue 1 year ago • 0 comments

$pdf->addPDF('path/to/source/file.pdf', '1,2', 'vertical')

Showing following error: Undefined index: w

I think it is a typo mistake in the PDFMerger.php on line 85: $fpdi->AddPage($file->getOrientationCode(), array($size['w'], $size['h']));

If you change the $size['w'] => $size['width'] and $size['h'] => $size['height'] the problem will be fixed.

vahiddabbagh avatar May 11 '23 09:05 vahiddabbagh