Reputation: 3264
I have a method to render a pdf with custom sizes
format.pdf do
render pdf: 'layout',
page_height: 20,
page_width: 25
end
It's generating a blank screen with no errors in log
if I remove those parameters (page_height and page_width) it works, but I need that custom size.
Any idea?
Upvotes: 0
Views: 364
Reputation: 3264
I found a solution, changed those numbers to string with units
format.pdf do
render pdf: 'layout',
page_height: "20cm",
page_width: "25cm"
end
Their documentation asks for number, but it worked for me like that.
Upvotes: 1