Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplexMerge #24

Open
larylinz opened this issue Jul 6, 2022 · 3 comments
Open

duplexMerge #24

larylinz opened this issue Jul 6, 2022 · 3 comments

Comments

@larylinz
Copy link

larylinz commented Jul 6, 2022

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
Copy link
Author

larylinz commented Jul 6, 2022

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
Copy link
Author

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
Copy link
Author

larylinz commented Jul 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant