Hi!
How can I set the size of the PDF? I need it to be 25x54mm.
Does anyone know? I see from the documentation that I can use "page-height", but how do I set it with the facade?
i use this
$pdf = SnappyPdf::loadView('salidas.pdf', compact('salida', 'title'))
->setOption('page-width', '215.9')
->setOption('page-height', '139.7');
What unit of measurement is this, btw? I want to make it A4 Size or Legal Size
What unit of measurement is this, btw? I want to make it A4 Size or Legal Size
You can use setPaper('a4') function for setting it to A4.
I know this is a long-ago post, but just to answer the question after a trial and error, the setOption() unit of measurement is mm
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Any issues with PDF rendering itself that are not directly related to this package, should be reported on https://github.com/KnpLabs/snappy instead. When having doubts, please try to reproduce the issue with just snappy.
If you believe this is an actual issue with the latest version of laravel-snappy, please reply to this issue so we can investigate further.
Thank you for your contribution! Apologies for any delayed response on our side.
Most helpful comment
i use this
$pdf = SnappyPdf::loadView('salidas.pdf', compact('salida', 'title'))
->setOption('page-width', '215.9')
->setOption('page-height', '139.7');