We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With DPI 96 all looks fine With DPI 300 header/footer moving to the center of page
DPI 96
DPI 300
Example:
$pdf = \App::make('snappy.pdf.wrapper'); $pdf->setOptions([ 'disable-smart-shrinking' => true, 'page-size' => 'A4', 'orientation' => 'portrait', 'dpi' => 300, // 96 ]); function htm($content) { return "<!DOCTYPE html><html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'/></head><body>$content</body></html>"; } $pdf->setOption('header-html', htm('<div style="background: red;">HEADER</div>')); $pdf->setOption('footer-html', htm('<div style="background: blue;">FOOTER</div>')); $pdf->loadHTML(htm('<div style="background: green">CONTENT</div>')); $response = $pdf->download();
The text was updated successfully, but these errors were encountered:
UPD: wkhtmltopdf issue wkhtmltopdf/wkhtmltopdf#3378
Sorry, something went wrong.
No branches or pull requests
With DPI 96 all looks fine
With DPI 300 header/footer moving to the center of page
DPI 96
DPI 300
Example:
The text was updated successfully, but these errors were encountered: