DynaPDF Manual - Page 589

Previous Page 588   Index   Next Page 590

Function Reference
Page 589 of 839
The optional array ExcludeCS can be used to define an array of color space handles which should be
excluded from color conversion.
ExcludeCSCount can be set to a negative number to reverse the meaning. That means convert these
color spaces and ignore all others.
Color conversion rules
The function does never convert gray objects into a higher color space. Image data is left unchanged
if the image uses an indexed color space and if scaling is not required. Only the indexed color space
is converted in this case.
Interactive objects like annotations and form fields are not converted to the destination color space
unless these objects would be flattened beforehand. Annotations and form fields can be flattened
with FlattenAnnots().
Objects that use overprinting can mostly not be converted to another color space without changing
the appearance of a page. To avoid issues with overprinted objects, the function can ignore such
objects, return with a fatal error, or convert them like any other object.
If overprinted objects should be excluded from color conversion, set the flag ofSkipOverprintedObj. If
the function should return with an error instead, set the flag ofFailOnOverprinting. If both flags are
absent then overprinted objects are converted to the specified color space.
Recommended compression filters
If PDF files are converterted to CMYK, e.g. for printing purposes, it is usually best to use loss-less
compression filters for all image types, e.g. JBIG2 for 1 bit images, and Flate for anything else. The
compression filters can be specified in the TOptimizeParams structure.
If no TOptimizeParams structure is provided, then images will be compressed with the same filter
that the original image used. The quality of JPEG and JPEG 2000 compressed images is taken from
the global property (see SetJPEGQuality()) in this case. Note that recompressing JPEG or JPEG 2000
images causes loss of quality.

Previous topic: Re-compressing 1 bit images with JBIG2, Text to outline conversion, Color conversion

Next topic: Special compression filter flags:, Image size check, Converting gray images to 1 bit (black & white), Image scaling, Spot color spaces