Color Management with Xpdf
XpdfRasterizer 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 may want to set a CMYK output profile:
cmykOutputProfile /full/path/to/cmyk-output-profile.iccBy default Xpdf will use the DestOutputProfile specified in the PDF file, if present. The
cmykOutputProfilesetting overrides DestOutputProfile.
If there is no DestOutputProfile in the PDF file, and there is no
cmykOutputProfilesetting, color management will not work properly.
- You'll probably want to enable overprint preview as well:
- If your file contains DeviceRGB color, you may want to set an RGB
defaultRGBInputProfile /full/path/to/rgb-input-profile.iccThis defaults to the built-in sRGB profile.
- 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.