Add example how to setup pagesize
KES777 opened this issue · comments
When I save pages as pdf they are saved us US Letter
here I can see an examples that chrome allow parameter to set page size:
await page.pdf({path: 'page.pdf', format: 'A4'});
I did not find how to setup this with help of your module. If this is possible may you please create an example?
I try to workaround that with @page{ size: A4 }
but there is bug in Chrome
Heh - ->content_as_pdf
and ->render_content
pass their options through, so the following should already work even though it is undocumented:
my $pdf = $mech->content_as_pdf( format => 'A4' );
I'll add that to the documentation, thanks for reporting this!
Released as 0.20, thanks!