Commit Graph
11 Commits
Author SHA1 Message Date
FredApps 235ede4896 Print: flatten transparent sheets for GDI (v3) printer drivers (#6155, #5838, #5940) (#6955)
* Print: flatten transparent sheets for GDI (v3) printer drivers

Windows sends a job for a GDI (v3) driver through its XPS-to-GDI
conversion, which fails on soft masks (#6155), prints halos around them
(#5838) or prints transparency as black boxes (#5940). XPS (v4) drivers
print the same pages correctly.

spooler_copy takes a flatten_transparency flag. With it, after greying
and before tiling, each sheet that uses transparency is replaced by an
opaque picture of itself (spooler::flattened): rendered at 300 dpi, lower
for a sheet past 80 MP or 16000 px a side, in tiles of at most
2000 x 2000 px, each an RGB Flate image over white, so no tile reaches
Windows' 2^22 px image cap and tiling leaves them alone. The sheet keeps
its boxes and rotation; its group and annotations go. Sheets without
transparency stay vector.

pdfcraft-preflight gets page_uses_transparency, the PDF/A transparency
search without counting a transparency group on its own, which Word
puts on every page.

Both callers pass false until the GDI-driver check lands.

* Print: flatten transparent sheets only for a GDI (v3) printer driver

spool::xps_driver / spool::gdi_driver read whether the printer's driver renders XPS itself,
through craft-print's new xps_driver (storytold/craft-libs#804, winprint
storytold/winprint.rs#21). The Print dialog and doc_print pass gdi_driver to spooler_copy's
flatten_transparency, so XPS (v4) drivers, PDF printers among them, keep vector sheets.

craft-print pinned to the craft-libs#804 branch, winprint to #21's, until they merge.

* craft-print 60ede99985ef1e5df87a2aca66ed538eb23dec99: craft-libs main with #804 (xps_driver), winprint bc06a7c4 (#21)

* Cargo.lock: the two winprint entries in Cargo's order (by source, after the re-pin)
2026-11-11 08:41:07 +01:00
jonathanwxh-cell 47961c2077 fix(preflight): walk soft-mask groups, indirect subtypes, and type 5 halftones (#6680) 2026-11-09 18:04:26 +08:00
mtlcl410andClaude Opus 5.5 916bca01c8 M11: 6.2.10 names the page of an unknown blend mode and reads shared resources once
The unknown-blend-mode issue carries its page, as the transparency issue
does. Pages keep what was found under the indirect objects they share
(resources, forms, patterns, Type 3 fonts, graphics states) in a
document-wide map, filled only from objects read to the end, so the next
page takes them in one read. The walk reads objects in place instead of
copying resources dictionaries and their entries, and gathers at most 32
unknown blend mode names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn
2026-11-07 08:28:41 +08:00
mtlcl410andClaude Opus 5.5 14f8c2c64c M11: 6.2.10 checks a calibrated blending space's white point values
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn
2026-11-05 12:24:05 +08:00
mtlcl410andClaude Opus 5.5 ffa5c23f7d M11: 6.2.10 wants a CalGray or CalRGB blending space to carry its white point
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn
2026-11-05 12:09:06 +08:00
mtlcl410andClaude Opus 5.5 75e9028e40 M11: 6.2.10 checks a device space's default and an ICC profile's header against its components
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn
2026-11-05 11:53:54 +08:00
mtlcl410andClaude Opus 5.5 798dfa44c1 M11: 6.2.10 accepts only blending colour spaces and real soft masks
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn
2026-11-05 11:35:05 +08:00
mtlcl410andClaude Opus 5.5 52131ba093 M11: 6.2.10 reads blend modes only from graphics states, wants a device-independent /CS and a profiled intent, rereads shallower
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn
2026-11-05 11:16:00 +08:00
mtlcl410andClaude Opus 5.5 0b2c452bb1 M11: transparency: cite the ISO 32000-1 clauses that define transparent painting
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn
2026-11-05 10:56:01 +08:00
mtlcl410andClaude Opus 5.5 c35d8441d9 M11: PDF/A verify reports blend modes ISO 32000-1 doesn't define (6.2.10)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn
2026-11-05 10:54:12 +08:00
mtlcl410andClaude Opus 5.5 19da2752cf M11: PDF/A verify reports a page with transparency and no blending colour space (6.2.10)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn
2026-11-05 10:52:22 +08:00