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
enableColorManagement
xpdfrc 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
cmykOutputProfile
setting overrides DestOutputProfile.If there is no DestOutputProfile in the PDF file, and there is no
cmykOutputProfile
setting, color management will not work properly. - You'll probably want to enable overprint preview as well:
overprintPreview yes
- If your file contains DeviceRGB color, you may want to set an RGB
input profile:
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
(
imageDevNToRGB
mode 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
defaultCMYKInputProfile
command. 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 whendefaultCMYKInputProfile
is not set.