How can I change paper size in headless Chrome –print-to-pdf
The page size could be set in inches/mm. I haven’t tested with a size in pixels. Here is a set of CSS rules which did the trick for me: @page { margin: 0; padding: 0; size: 5in 6.5in; } My exact case is rendering svg-to-pdf, not html; For svg, you may also need to add … Read more