3 ms·
> figuring out how to set the page size to match what you see on the screen can be near-impossible I run a little API that converts URLs and HTML into PNG/PDF/
by cjr 4y ago
> figuring out how to set the page size to match what you see on the screen can be near-impossible
I run a little API that converts URLs and HTML into PNG/PDF/SVG.. MP4 too, and the quoted part resonates :)
I recently started delving into the chromium src code in order to try and figure out the reason why max-width media queries don't seem to trigger at the expected viewport/page width, when printing to PDF, but it is quite the rabbit hole.
When I saw html2svg the first thing I wondered was whether it would have the same issue as printing to PDF.