From 8cda34e137e6f308e712cb1f0f92a06f9fdb7e69 Mon Sep 17 00:00:00 2001 From: aiongg Date: Fri, 23 Oct 2026 05:00:32 +0000 Subject: [PATCH] pdf: document that the print color settings return a Result --- crates/pdf/README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/pdf/README.md b/crates/pdf/README.md index f9942979..4015c1ea 100644 --- a/crates/pdf/README.md +++ b/crates/pdf/README.md @@ -122,11 +122,13 @@ serialization uses the same backend version as before extraction. It provides: ### Print color -`write::print::cmyk_blending(profile)` returns `SerializeSettings` for a plain CMYK print -PDF: DeviceCMYK color and transparency blending in CMYK (`GroupColorSpace::Cmyk`), with no -output intent. `write::print::settings` adds the document's CMYK profile as a `GTS_PDFX` -output intent and `/Trapped /False`, for PDF/X. The profile is the document's working space. craft-pdf takes the profile bytes and does not depend on -craft-cms. Its CC0 `builtin::COATED_FOGRA39_ICC` is the default working space, described by +`write::print::cmyk_blending(profile)` returns `Result` +with the settings for a plain CMYK print PDF: DeviceCMYK color and transparency blending in +CMYK (`GroupColorSpace::Cmyk`), with no output intent. `write::print::settings` adds the +document's CMYK profile as a `GTS_PDFX` output intent and `/Trapped /False`, for PDF/X. Both +fail with `WriteError::InvalidProfile` when the profile is not a readable CMYK ICC profile. +The profile is the document's working space. craft-pdf takes the profile bytes and does not +depend on craft-cms. Its CC0 `builtin::COATED_FOGRA39_ICC` is the default working space, described by `PrintColor::fogra39`: ```rust