PeachPDF
PeachPDF
ColorOptions Class
Print color-management options, set via ColorOptions. Mirrors the Metadata/PdfDocumentMetadata nested-options pattern.
public sealed class ColorOptions
Inheritance System.Object → ColorOptions
Remarks
Real, colorimetric ICC device-to-device conversion (ConversionMode beyond
PreserveAsAuthored, RenderingIntent,
UseBlackPointCompensation) via PeachImage’s IccColorProfile.ConvertTo - no
naive RGB<->CMYK formula is used anywhere. A color’s source profile is always well-defined: an
RGB-authored color’s source is the ICC-published sRGB profile PeachPDF already bundles for PDF/A
(CSS colors are sRGB by definition outside of device-cmyk()); a device-cmyk()-authored
color is uncalibrated ink by definition (CSS PaintColor 5 §6) and has no source profile unless
FallbackCmykProfile supplies one, so without that set, a device-cmyk() color is
left exactly as authored even under a conversion mode - there is nothing to convert *from*.
| Properties | |
|---|---|
| BlackGeneration | How an achromatic (gray, including pure black) RGB-authored color is represented when it must become CMYK - under X1a today, since that level rejects chromatic RGB outright but would otherwise reject every un-set default text/border color too (the UA stylesheet’s colors are RGB). Defaults to UseTrueBlack. An achromatic value has an exact, lossless ink mapping either way (unlike a chromatic color, which needs a real color-managed conversion - see ConversionMode) - this specific mapping is not an approximation, and is independent of ConversionMode/ RenderingIntent (it never goes through PeachImage’s ICC engine). |
| ConversionMode | How document colors should be converted for output. Defaults to PreserveAsAuthored (no conversion). Every mode is real, colorimetric ICC conversion via PeachImage’s IccColorProfile.ConvertTo - see this class’s remarks for which colors have a defined source profile to convert from. |
| ConvertToProfile | An arbitrary ICC profile to convert every (RGB, or CMYK when FallbackCmykProfile gives it a source) color into, when ConversionMode is ConvertToProfile. |
| FallbackCmykProfile | A CMYK ICC profile giving a device-cmyk()-authored color a defined source profile to convert *from* under a non-PreserveAsAuthoredConversionMode (see this class’s remarks - without this set, such a color is left unconverted). Also the required conversion target for GrayscaleViaK - every color (RGB via the bundled sRGB source, or CMYK via this profile) is converted into it and only the resulting K channel is kept. |
| OutputIntentIdentifier | A human-readable name for OutputIntentProfile’s intended output condition (e.g. "Coated FOGRA39") - written as the output intent’s /OutputConditionIdentifier/ /Info. Required alongside OutputIntentProfile whenever PdfXConformance is not None. |
| OutputIntentProfile | The ICC profile bytes to embed as the document’s /OutputIntents destination profile, and (when ConversionMode is ConvertToOutputIntent) the conversion target every color is converted into. Required when PdfXConformance is anything but None - PeachPDF bundles no default press profile, unlike the sRGB profile it bundles for PdfAConformance, since there is no single correct default for a print output intent. Under X1a this profile must itself be a CMYK profile (validated at generation time); X3/ X4 accept a CMYK, RGB, or Gray profile. |
| RenderingIntent | The ICC rendering intent to use for a color-managed conversion (ConversionMode other than PreserveAsAuthored). Defaults to RelativeColorimetric (the common print default). |
| UseBlackPointCompensation | Whether a color-managed conversion applies black point compensation (ICC.1:2010 Annex A) - scaling the source profile’s black point to the destination profile’s, reducing shadow clipping/crushing when the two differ. Meaningful for Perceptual/ RelativeColorimetric/Saturation but not AbsoluteColorimetric, which by definition preserves the actual white/black points instead. Defaults to true. Note that Perceptual already applies its own built-in black-point handling independent of this flag - the two compound, so if shadows look over-compressed with both in play under Perceptual, try RelativeColorimetric instead. |