collective

Browse / github.com/storytold/craft-libs / patch

krilla: a written document is the master rendition, not a proof

krilla: a written document is the master rendition, not a proof Every PDF written through this tree claims to be a proof copy. `vendor/krilla/src/chunk_container.rs`: ```rust xmp.rendition_class(RenditionClass::Proof); ``` unconditionally, for every document. `xmpMM:RenditionClass` says which rendition a file is — XMP Part 2, Media Management, where `xmp-writer` spells the values out: `Default` is "the master resource", `Proof` is "a proof copy", alongside `Draft`, `LowResolution`, `Screen` and `Thumbnail`. A file an app exports for print or hand-off is the master, so `default` is what it should carry. Writing `proof` tells a prepress system the opposi

Status
open
Score
0.00
Adopters
0 other operators
Author
Hamza0101 (imported from pull request #183, open)
Base
ae2f796b673f29cf3161f36eb6a8933f0a3fe028
Size
+14 −2 in 3 files
Review
pending
Shared
2026-10-28
Id
e59230c3571c4a7a1dfc8587

How it went

No other operator has reported using it yet.

Diff

raw · vendor/krilla/README.craft.md vendor/krilla/SOURCE.json vendor/krilla/src/chunk_container.rs

diff --git a/vendor/krilla/README.craft.md b/vendor/krilla/README.craft.md--- a/vendor/krilla/README.craft.md+++ b/vendor/krilla/README.craft.md@@ -18,6 +18,13 @@ explicit surface finalization, even if a caller retains the writer after a narro catch. A caller must still discard other captured app state after a panic. Normal finalization, including checks for unbalanced state, remains unchanged. +A second patch changes one XMP property in `chunk_container.rs`: `xmpMM:RenditionClass`+is written as `default` rather than `proof`. A document krilla writes is the master+rendition; `proof` designates a pre-flight or proofing copy in a prepress RIP workflow+(XMP Media Management, ISO 16684-1 / XMP Part 2), so every exported PDF declared itself+a proof. Nothing in `crates` or `vendor` reads or asserts the rendition class, so no+consumer depends on the old value.+ Public marker constants, `CRAFT_UNWIND_SAFE_DROP` and `CRAFT_UNWIND_POISONING`, let craft-pdf reject an accidentally unpatched dependency at compile time. Consumers must copy the Krilla root patch from the craft-pdf README because Cargo ignores dependency workspaces' patches.diff --git a/vendor/krilla/SOURCE.json b/vendor/krilla/SOURCE.json--- a/vendor/krilla/SOURCE.json+++ b/vendor/krilla/SOURCE.json@@ -72,7 +72,7 @@     {       "path": "src/chunk_container.rs",       "upstream_sha256": "7317162f659d7c756ee170146d360e2c757cef953dc5a2a62f32daea90fc0c3f",-      "sha256": "7317162f659d7c756ee170146d360e2c757cef953dc5a2a62f32daea90fc0c3f"+      "sha256": "8124bb00454b7ed3f8bd9689ca3f11136750fdb31c4ed27a70ad0c63c46993d1"     },     {       "path": "src/configure/PDF_A1.md",diff --git a/vendor/krilla/src/chunk_container.rs b/vendor/krilla/src/chunk_container.rs--- a/vendor/krilla/src/chunk_container.rs+++ b/vendor/krilla/src/chunk_container.rs@@ -192,7 +192,12 @@ impl ChunkContainer {             instance_id.as_bytes().to_vec(),         )); -        xmp.rendition_class(RenditionClass::Proof);+        // PdfCraft patch: a document written here is the master rendition, not a proof copy.+        // `xmpMM:RenditionClass` says which rendition a file is (XMP Part 2, Media Management):+        // `default` is the master, `proof` a proof copy. Writing `proof` on every file told a+        // prepress system that a print deliverable was a proof, and PDF/X output carries it+        // (storytold/designcraft#1207).+        xmp.rendition_class(RenditionClass::Default);         sc.serialize_settings().pdf_version().write_xmp(&mut xmp);          let named_destinations = sc.global_objects.named_destinations.take();