Reputation: 1744
Im using wicked pdf for generating pdf files from views, but I mentioned that wicked_pdf cant generate pdf wider, than my browser's viewport. Is it possible to generate pdf with render_to_string from view, that wider than browser's viewport when filled with data? p.s sorry for tautology.
Upvotes: 0
Views: 1395
Reputation: 6068
wkhtmltopdf v0.12.0 added support for --viewport-size
option that you could use to adjust the viewport to your liking.
Unfortunately WickedPdf doesn't seem to have upgraded to that version yet and does not allow you to specify viewport size.
At the moment your best option would be to patch WickedPdf yourself by adding :viewport_size
to the allowed options somewhere in the parse_others
method (don't forget documentation and README) and then make a pull-request.
Upvotes: 2