Laravel-snappy: Using --viewport-size on Snappy

Created on 20 Jan 2015  路  4Comments  路  Source: barryvdh/laravel-snappy

Hi,
I'm using a admin panel with Twitter Bootstrap 3, and my pdfs are getting the responsible styles. I was looking for this option (--viewport-size) on the wkhtmltopdf docs, but there aren't any examples.

Is it possible to use this option with Snappy? Or there is other way to fix the Bootstrap display styles?

Thanks

Most helpful comment

Nevermind, I was just using wrong the "setOption" of the wrapper.

It's just return PDF::loadFile('http://site.com')->setOption('viewport-size', '1366x1024' )->stream('file.pdf');

:D

All 4 comments

Nevermind, I was just using wrong the "setOption" of the wrapper.

It's just return PDF::loadFile('http://site.com')->setOption('viewport-size', '1366x1024' )->stream('file.pdf');

:D

Thanks!

@vitorarjol This helped me solve a problem ive been dealing with for several hours :D
Cheers mate!

That's great @surgiie \o

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LucasPantoja picture LucasPantoja  路  8Comments

jerearaujo03 picture jerearaujo03  路  5Comments

vitorf7 picture vitorf7  路  6Comments

Lednerb picture Lednerb  路  3Comments

ghost picture ghost  路  3Comments