Exclude header and footer from first and last page #31
danielveselinov
started this conversation in
Ideas
Replies: 1 comment
-
You are able to generate two PDF files the first one with the portrait and another skipping the first page with: Pdf::view('test')
->withBrowsershot(function (Browsershot $browsershot) {
$browsershot>initialPageNumber(8);
}); and then use a library to merge files like: https://github.com/hanneskod/libmergepdf se iio\libmergepdf\Merger;
$portrait = Pdf::view('portrait')->save('portrait.pdf');
$content = Pdf::view('your-content')->save('content.pdf');
$merger = new Merger;
$merger->addIterator([$portrait, $content]);
$createdPdf = $merger->merge(); it should works |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think the possibility of excluding the header/footer from the first/last page is a great feature that can be implemented in this package since it could be used not only for generating invoices but also for much more complex PDFs.
Beta Was this translation helpful? Give feedback.
All reactions