Files
pdfcraft/xtask
pechnikov2026-starandpechnikov2026-star 66edead348 demo-pdf: two fixes so xtask demo-pdf and xtask screenshots work on Windows (#954)
* 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]>
2026-10-11 13:16:12 -04:00
..
2026-09-30 11:00:02 -04:00