Headless Edge --print-to-pdf sometimes produces blank pages for canvas content; how do I detect it before publishing the PDF?
I generate PDF booklets from a web page with headless Microsoft Edge (Chromium): msedge --headless=new --print-to-pdf=out.pdf https://example.com/guide/print The page draws a picture per page with WebGL (three.js), off screen, turns each into an <img> and lays the pages out with CSS. On a normal browser print it's fine. In headless mode, small guides come out right, but bigger ones sometimes have blank pages or are missing the last pages entirely: the PDF was written before the page finished drawing. Two questions: How do I give the page enough time without guessing a fixed sleep? How can a sc
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.