laravel-pdfmerger icon indicating copy to clipboard operation
laravel-pdfmerger copied to clipboard

duplexMerge

Open larylinz opened this issue 2 years ago • 3 comments

Hello! I'm on L9 and try to duplexMerge some PDFs. On my local Installation (Homestead) it works - but on my Server (both PHP8.1) it doesn't. It gives me: Cannot access protected property setasign\Fpdi\Fpdi::$page Simple merge works - duplex throws the error. :/ What could be wrong?

larylinz avatar Jul 06 '22 09:07 larylinz

solved this by changing line 241 in PDFMerger: from '$oFPDI->page': if ($duplexSafe && $oFPDI->page % 2) { $oFPDI->AddPage($file['orientation'], [$size['width'], $size['height']]); } to '$count': if ($duplexSafe && $count % 2) { $oFPDI->AddPage($file['orientation'], [$size['width'], $size['height']]); }

larylinz avatar Jul 06 '22 14:07 larylinz

Added automatic orientation from: https://github.com/GrofGraf/laravel-pdf-merger/pull/11/files (thxs to coupej) I do not know, how do add a pull request - could this to somebody else?

larylinz avatar Jul 26 '22 14:07 larylinz

could somebody do a commit to fix autoorientation within duplexMerge? public function duplexMerge($orientation = 'P') => public function duplexMerge($orientation = null)

larylinz avatar Jul 04 '24 15:07 larylinz