barryvdh / laravel-snappy

Laravel Snappy PDF
MIT License
2.63k stars 290 forks source link

Flip paper size in blade #456

Closed spartyboy closed 2 years ago

spartyboy commented 2 years ago

I want to be able change the paper size from a4 to lets say a6, or flip a4 from landscape to portrait in blade while going through a loop

alexhackney commented 2 years ago

You would just set it on each loop.

$pdf = PDF::loadView($view, $data)->setPaper('a4')->setOrientation('landscape');
return $pdf->download('invoice.pdf');
stale[bot] commented 2 years ago

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.