SetOutputIntentSpectralData

Compliance, colour management

Description

Adds, replaces or removes one colourant entry in the PDF 2.0 OutputIntent /SpectralData dictionary

Syntax

Delphi

Function SetOutputIntentSpectralData(PageNumber: Integer; Const ColorantName, CxFFileName: WideString): Integer;

Parameters

PageNumber0 for the Catalog output intent, or a one-based page number for an explicit page output intent
ColorantNamePDF colourant name that the CxF/X-4 data characterises
CxFFileNameUTF-8 or BOM-marked UTF-16 CxF/X-4 XML file up to 64 MiB, or an empty string to remove the named entry

Return value

1 on success, or 0 when the target has no output intent, the file is unreadable or malformed, the XML has no CxF root, the named colourant does not have exactly one matching SpotInkCharacterisation, or the same colourant appears in /Solidities

Remarks

The XML parser is non-resolving, rejects declarations such as external document types, requires balanced markup and decodes predefined and numeric XML entities before comparing SpotInkName

Data is stored in a compressed stream; assigning identical CxF bytes again to the same or another colourant reuses the existing indirect stream instead of embedding a duplicate

PDF/X preflight independently decodes every spectral stream, enforces a unique matching spot-ink entry and rejects overlap with mixing-hint solidities

See also

SetOutputIntentMixingHints, ClearOutputIntentColorantData, GetEffectivePageOutputIntentJSON, SetPDFXMode