I'm trying to generate a PDF that has no embedded ICC color profile (a requirement of the printer I'm working with.) However, when xelatex runs and eventually calls xdvipdfmx to generate a PDF, an RGB ICC color profile is embedded by default. I can't seem to figure out how to prevent this from occurring. Is there a way that I can modify the process so that this won't be embedded? Thanks!


There are two related questions. I can only answer one of them. It is not the question you asked, but is so closely related that it merits discussion.

If the PDF contains any images, it is possible that one or more of the images has its own *.icc color profile embedded. That's allowable in PDF, even in some versions of PDF/X. But it is not allowed in the oldest versions of PDF/X, which are the ones often used by commercial print-on-demand services.

To ensure that each image has no embedded color profile, you can use ImageMagick or GraphicsMagick to remove them. In the case of GraphicsMagick, something like this will usually work:

gm mogrify -strip yourimage.png  (or .jpg)

There are other considerations, too detailed to discuss here. Understand that a jpg image will be re-compressed, which can lose some sharpness.

If your images are RGB, but the printer wants CMYK, that's a different issue. You will have to convert the color space in a graphics program. Command-line instructions can be found in the HTML documentation for `novel' package, but do not require you to use that package.

Now to your original question: The entire PDF may have its own color profile attached, but this is rarely a necessity, and many printers object to it. The embedded profile can be removed using professional software, or a hex editor if you know how (beware!). Some methods of preparing PDF/X in LaTeX allow you to choose whether or not a color profile is embedded, but I have no idea regarding XeLaTeX and xdvipdfmx. If your document can be compiled with LuaLaTeX instead, you may have more choices using the \pdfx package.

  • Thank you! It turns out that in practice, for a black and white interior PDF, Ingram Spark is just ignoring the embedded RGB profile, so this turned out not to be a serious issue for me, but I'm going to play around with this some more. I also realized that the latex generation isn't the problem, but Ghostscript. I've been outputting whatever kind of PDF xelatex gives me, then converting it to PDF/X using Ghostscript, and it seems it's Ghostscript that insists on inserting the ICC. – Crankycyclops Jan 1 '18 at 8:50
  • @Crankycyclops The next time around, if your book is more like a novel than an academic thesis, consider using the novel document class. It is pre-configured for print on demand publishing. Has been used for that purpose. Uses LuaLaTeX only. – user139954 Jan 2 '18 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.