Color conversion with Adobe PDF Library
The correct display of color on different devices has always been an important part of PDF technology. Using the correct color model when working with documents allows for more predictable results. Different color models can be used to achieve different things. Need to use a document in a print workflow? A CMYK color space will mimic how the ink will look on paper. Is the output meant for a computer monitor? An RGB color space can display a larger color gamut than CMYK can.
In the APDFL 10.1.0P4s release, the tools for color conversion were made available to the .NET and Java interface making the process of color converting a document really easy.
The color conversion process can be applied on three different levels:
1. Document level.
2. Page level.
3. Element level.
At the Document and Page level, it is possible color convert the entire content or only certain types of content. For example, in a document with many images, a specific action can be applied to images in the RGB color space, while a different action is applied to images that use a CMYK color space, the API can differentiate between the different content types such as text, line art, transparency, etc. Alternatively, color conversion can be applied to individual elements the document with a single function call.
Lets look at a quick example on how to convert a PDF to the sRGB colorspace using C#. This code will also embed the profile in the document making the content more reliably readable in different workflows:
Learn more about Adobe PDF Library and start your free eval today.