SetBlackPointCompensation

Graphics, Colour

Description

Declares black point compensation for subsequent drawing through an ExtGState /UseBlackPtComp entry as defined by ISO 32000-2 §8.6.5.9

Syntax

Delphi

Function TPDFlib.SetBlackPointCompensation(Mode: Integer): Integer;

Parameters

Mode0 writes /Default and leaves the decision to the PDF processor, 1 writes /ON, and 2 writes /OFF

Return values

0The mode is invalid, no document is selected, or the document uses a PDF/A mode
1The state was applied to the current content

Remarks

The key requires PDF 2.0 and raises the document version automatically; PDF/A modes reject the call because their supported PDF versions cannot carry this state. The state follows normal

The state follows normal q/Q save and restore semantics and is inherited by a Form XObject from the graphics state active at its Do operator

EnumPageContentStates and EnumPageContentStatesEx expose the effective value through TPDFlibContentGraphicsState.BlackPointCompensation; recursive enumeration therefore distinguishes a Form inherited as ON, OFF, or Default at each invocation

When the current rendering intent is AbsoluteColorimetric, ISO 32000-2 requires the effective black point compensation value to be treated as OFF during colour conversion even if the stored graphics-state value is ON

Equal modes share one cached ExtGState object

Example

PDF.SetBlackPointCompensation(1); // ON for the proof-critical artwork
PDF.DrawBox(50, 50, 200, 120, 1);

See also

EnumPageContentStates, EnumPageContentStatesEx, TPDFlibContentGraphicsState, SetOverprint, LoadOutputIntentProfile, SetBlendMode