Color Management with XpdfXpdfRasterizer and the Xpdf source code with the DeviceN rasterizer add-on both provide access to a DeviceN rasterizer with support for color management.
Here are some notes on properly configuring Xpdf for color management. (For information on the xpdfrc configuration file, see the xpdfrc support FAQ.)
- Color management is primarily useful in CMYK and DeviceN modes. To generate RGB output, render pages in CMYK or DeviceN, and then convert the resulting image to RGB.
- To enable color management, use the
enableColorManagementxpdfrc command:enableColorManagement yes
- You'll need to set a CMYK output profile:
cmykOutputProfile /full/path/to/cmyk-output-profile.iccThere is no default CMYK output profile – this value MUST be set for color management to work properly.
- You'll probably want to enable overprint preview as well:
- If your file contains DeviceRGB color, you should set an RGB input
defaultRGBInputProfile /full/path/to/rgb-input-profile.iccThis can also be set to the built-in sRGB profile:defaultRGBInputProfile sRGBNote that there is no default value – if
defaultRGBInputProfileis not set, DeviceRGB colors will not be color-managed (the conversion to CMYK will use simple component inversion).
- If you're using Xpdf's DeviceN-to-RGB conversion code
imageDevNToRGBmode in XpdfRasterizer, or the '
-devnRGB' switch in pdftoppm/pdftopng), you may want to set an RGB output profile:rgbOutputProfile /full/path/to/rgb-output-profile.iccThis defaults to the built-in sRGB profile.
- You probably will NOT want to use the
defaultCMYKInputProfilecommand. This will set an input profile to be used for converting DeviceCMYK colors. Generally DeviceCMYK should be copied to the CMYK output, unchanged – which is the default behavior when
defaultCMYKInputProfileis not set.