LoadOutputIntentProfile

Document properties, Compliance

Description

Replaces the bundled sRGB ICC profile used by the selected document OutputIntent with an external profile.

Call SetPDFAMode first to create the OutputIntent skeleton, then call this function when the archive profile must be CMYK, grayscale, or a custom RGB profile instead of the built-in sRGB stream.

Syntax

Delphi

Function TPDFlib.LoadOutputIntentProfile(Const FileName: WideString; Const ColorSpace: AnsiString): Integer;

ActiveX

Function PDFlib::LoadOutputIntentProfile(FileName As String, ColorSpace As String) As Long

Available on IPDFlibrary5 from type library version 3.6

DLL

int DLLoadOutputIntentProfile(int InstanceID, const wchar_t* FileName, const char* ColorSpace);
int DLLoadOutputIntentProfileA(int InstanceID, const char* FileName, const char* ColorSpace);

Parameters

FileNamePath to the ICC profile file.
ColorSpaceOutput profile device class to declare, such as DeviceRGB, DeviceCMYK, or DeviceGray.

Return values

Returns 1 when the profile is loaded into the existing OutputIntent. Returns 0 if the file cannot be read, the color space is not accepted, or the document has no OutputIntent yet.

Remarks

The profile header must describe the requested colour space (CMYK for DeviceCMYK, RGB for DeviceRGB, GRAY for DeviceGray); a mismatched profile is refused and the method returns 0. PDF/X preflight applies the same check to the embedded profile and its /N entry

See also

SetPDFAMode