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

wkhtmltopdf 0.12.6 - Footer Not Rendered #535

Open
mihir8400 opened this issue Aug 16, 2024 · 3 comments
Open

wkhtmltopdf 0.12.6 - Footer Not Rendered #535

mihir8400 opened this issue Aug 16, 2024 · 3 comments

Comments

@mihir8400
Copy link

wkhtmltopdf --version
wkhtmltopdf 0.12.6

I'm encountering an issue with wkhtmltopdf version 0.12.6 where the footer is not rendering in generated PDF.
I am trying both way using "view" and the simple way "footer-center"
Code is given below.

`$mainhtml = view('web.digital_quote.generate-pdf', compact('data'))->render();
// $footerhtml = view('web.digital_quote.pdf-footer')->render();
$footerhtml = '

Hello World
';

$pdf = PDF::loadHTML($mainhtml)
->setPaper('a4')
->setOption('footer-center', $footerhtml);

$pdfName = 'digital_quote_.pdf';
return $pdf->stream($pdfName);
`

@rentacarinmx
Copy link

I have exactly the same problem here.

@Duynguyennnt
Copy link

You can try option 'footer-html'
$pdf = PDF::loadHTML($mainhtml)
->setOption('footer-html, view('web.digital_quote.pdf-footer'));

@mihir8400
Copy link
Author

You can try option 'footer-html' $pdf = PDF::loadHTML($mainhtml) ->setOption('footer-html, view('web.digital_quote.pdf-footer'));

already done but not work,
Here I want The footer remain on the last page
Not each page

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

3 participants