Color conversion with APDFL

Color conversion with APDFL

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.

One thought on “Color conversion with APDFL

  1. I heard that applying colors is considered in a delicate process which needs to be taken care in context the audience & the environment of the website you want to modify. So I started reading articles related color code conversions. What I found in your article is a simply unique thing that we can apply or convert PDF or any DOC with sRGB. I think this is very amazing or even more impressive thing that one can enjoy using any doc which is full of colors rather than only black and white. I accept the choice is highly individual but still, I have tried this code and it works for me. Very impressive work. I am looking forward to new codes like this. Thanks for sharing.

Leave a Reply

Your email address will not be published. Required fields are marked *