Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  


Enables color management for render functions.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 5.3 Yes Yes Yes Yes Yes

MBS( "DynaPDF.InitColorManagement"; PDF { ; DestSpace; Flags; DefInGray; DefInRGB; DefInCMYK; DeviceProfile; SoftProof } )


Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
DestSpace Optional
Destination color space. Can be DeviceRGB, DeviceCMYK or DeviceGray. Default is DeviceRGB.
Flags Optional
Flags for color management initialization. Can be Default or a combination of BPCompensation (1), CheckBlackPoint (2) or both (3).
DefInGray Optional
Path to gray profile.
You can pass empty text if you have no gray profile.
"/Users/cs/Desktop/Generic Gray Profile.icc"
DefInRGB Optional
Path to RGB profile.
You can pass empty text if you have no RGB profile.
"/Users/cs/Desktop/Generic RGB Profile.icc"
DefInCMYK Optional
Path to CMYK profile.
You can pass empty text if you have no CMYK profile.
"/Users/cs/Desktop/Generic CMYK Profile.icc"
DeviceProfile Optional
Path to Device profile, must be compatible with the output color space. Default is sRGB.
You can pass empty text if you have no device profile.
SoftProof Optional
Path to output profile for emulating output device.
You can pass empty text if you have no soft proof profile.


Returns OK or error.


Enables color management for render functions.
All color profiles are optional. Default profiles for DeviceGray and DeviceRGB color spaces (sRGB is default) are automatically created if not provided.
The most important color profile is the CMYK profile because it is not possible to create such a profile with build-in functions. If no CMYK profile is set DynaPDF renders CMYK only with color management if the file contains corresponding ICCBased color spaces or an embedded CMYK output intent.
The SoftProof profile specifies an arbitrary output color space that should be simulated.
Although Black Point Compensation (BPC) is not enabled by default, it is recommended to enable it because it improves the rendering quality of CMYK images a lot.
All profile paths must be absolute paths. Otherwise it is maybe not possible to reload a profile if necessary. DynaPDF must be able to reload the profiles if a PDF file contains ICCBased color spaces.
Initializing the color management requires a considerable amount of processing time. It is strongly recommended to use one PDF instance as long as possible so that it must not be initialized again when another PDF file will be rendered.
The color management can be initialized right after the PDF instance was created. If you want to initialize it on demand then make sure that you call the function before OpenImportFile. Otherwise it is possible that certain objects will be rendered without color management.
Returns OK on success.

See also DynaPDF.InitColorManagementEx.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.

See also InitColorManagement function in DynaPDF manual.


Initialize with only a CMYK profile:

MBS("DynaPDF.InitColorManagement"; $pdf; "DeviceCMYK"; 3; ""; ""; "/Users/cs/Desktop/PDF_to_JPEG Test/Generic CMYK Profile.icc")

Initialize for output to CMYK:

MBS("DynaPDF.InitColorManagement"; $pdf; "DeviceCMYK";
"/Users/cs/Desktop/PDF_to_JPEG Test/Generic Gray Profile.icc";
"/Users/cs/Desktop/PDF_to_JPEG Test/Generic RGB Profile.icc";
"/Users/cs/Desktop/PDF_to_JPEG Test/Generic CMYK Profile.icc";
"/Users/cs/Desktop/PDF_to_JPEG Test/Generic CMYK Profile.icc"

See also

DynaPDF.ImportPageAsTemplate   -   DynaPDF.InitColorManagementEx

Feedback: Report problem or ask question.

MBS FileMaker Plugins