mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-14 19:27:04 -04:00
* demo-pdf: build a working file:// URL on Windows Windows Path::canonicalize returns a verbatim \?\C:\... path. After the backslash swap that is //?/C:/..., which the Unix/Windows branch then misreads as an absolute Unix path, producing file:////?/C:/... Chrome fails to load that URL and prints one blank page, so on Windows cargo xtask demo-pdf and cargo xtask screenshots always fail with "Chrome produced 1 pages but the showcase layout expects 12". Strip the //?/ prefix before classifying, and add a regression test. * demo-pdf: don't accept Skia's incremental %%EOF writes as a finished PDF Chrome writes the print-to-pdf output incrementally and every increment ends with its own %%EOF, so the completion poll accepted the first ~29 KB increment (one page of twelve) as final and killed Chrome mid-print. Require the file size to stay quiet for 10 consecutive 500 ms polls before treating the file as finished; waiting for process exit alone is not enough because some Chrome builds linger after writing. --------- Co-authored-by: pechnikov2026-star <[email protected]>