PDFNet renders some colors differently from Acrobat. How do I adjust color conversion?


I have a PDF that contains a pie chart that is shaded with a dark
bluish/purplish color. When I view the PDF with the PDFView component
the shaded area of the pie chart shows up as a normal blue instead of
the original color as when opened with Adobe Reader. How do I adjust
color conversion?

The color difference is most likely due to different settings that
drive color conversion in Acrobat and PDFNet. Using PDFNet SDK, you
can adjust color conversion by overriding default RGB and CMYK color
profiles (using PDFNet.SetColorManagemen(true) and

You can download standard Adobe ICC profiles using the following link:
http://www.adobe.com/support/downloads/detail.jsp?ftpID=3145 (or
Google search "Adobe ICC").

Any other profiles will also work, but the above ones are good in case
you would like to get closer to Acrobat color output. After
downloading the archive, copy all *.icc files to PDFNet resource
folder (i.e. path you use in PDFNet.SetResourcesPath(...), you can
also place ICC profiles to any other location, but in this case you
need to provide absolute paths).

Finally you can set the profiles after calling
PDFNet.SetResourcesPath() as follows:

try {
  // Optional: Set ICC color profiles to fine tune color conversion
  // for PDF 'device' color spaces. You can use your own ICC
  // Standard Adobe color profiles can be download from Adobes site:
  // http://www.adobe.com/support/downloads/iccprofiles/iccprofiles_win.html
  // Simply drop all *.icc files in PDFNet resource folder or you
  // the full pathname.
  PDFNet.SetDefaultDeviceCMYKProfile("USWebCoatedSWOP.icc"); // will
search in PDFNet resource folder.
catch (Exception) {
  // Console.WriteLine("The specified color profile was not found.");