Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using pdflatex, and use \includegraphics to include content of figures from PDF. PDF are exported from InkScape.

\begin{figure} [!h]
    \centering
    \includegraphics[height=3cm]{fig/SUSAN.pdf}
\end{figure}

Included PDF or source SVG has same colors. Green has always RGB value (0, 255, 0). Problem occurs when I include this files from LaTeX. In output PDF on some pages colorspace is darker. Even same image on other page has different colourity.

My PDF http://www.stud.fit.vutbr.cz/~xzamaz00/smutny_smajlik.pdf . As you can see on page 7 (11 in PDF) USAN areas are bright green, but then on page 5 (9 in PDF) are green points on corners more darker.

share|improve this question
3  
Could be a RGB versus CMYK color model issue. Try it again after loading the xcolor package with the cmyk option. If you get an option clash replace it with \PassOptionsToPackage{cmyk}{xcolor}. Are you using any form of transparency in your document? –  Martin Scharrer Apr 18 '11 at 11:37
3  
The question PDF colour model and LaTeX might give some general insight about color model in LaTeX. The last section of the answer mentions InkScape and CMYK and links to the online article "Inkscape Does Support CMYK" which seems to be relevant here. –  Martin Scharrer Apr 18 '11 at 11:39
12  
Use a different viewer than Adobe Reader (PDF-X-change viewer does not have this problem) or add \pdfpageattr {/Group << /S /Transparency /I true /CS /DeviceRGB>>} to the preamble of your document. This will make Adobe Reader use the RGB rendering model for pages with transparency. –  Martin Heller Apr 18 '11 at 14:50
1  
You need to use \special{pdf: [...stuff...]}. See The dvipdfm manual dvipdfm.pdf for the precise syntax of [...stuff...]. –  Martin Heller Sep 26 '11 at 9:59
1  
@Martin: I'll try that, but I've managed to fix the problem by converting the image pdf to PDF 1.3 format. I started a separate question about this (because my problem is with xetex, and not pdflatex): tex.stackexchange.com/questions/29523/… –  Matthias Sep 26 '11 at 11:26
show 2 more comments

3 Answers

As Martin Heller already points out, this is probably a transparency issue: Your PDF may use page groups, which need special treatment in pdftex/luatex to work. This should be fixed in pdfTeX since 1.40.6, but might fail in luatex - and I don't know about XeTeX. Martin's solution should work with pdftex/luatex.

share|improve this answer
    
I've read before that this type of problem has been fixed in pdftex, but I'm curious about how it was fixed. Are you able to point me to the changeset/patch that introduced the fix? –  Lev Bishop May 27 '11 at 12:38
    
You'd have to check the changes between 1.40.5 and 1.40.6. The solution is adding the /Group as explained by Martin Heller above if needed (that is if an included PDF has a /Group key or a png has transparency). The synthesized /Group kicks the transparency mechanism of Adobe Reader. –  Martin Schröder May 27 '11 at 20:16
1  
The bug was later re-introduced and re-fixed, see this bug report –  matth Nov 4 '11 at 13:37
add comment

For XeLaTeX, this problem also occurs and can be fixed by running a small program XeLaTeX-FixRGB on the resulting PDF.

share|improve this answer
1  
There is easier fix, see link, just add that code to your preamble. –  Vladimir S. Oct 5 '12 at 0:44
add comment

Hey I had the same problem with my Lyx docment using pdflatex. I simply copied the line from Martin Heller, \pdfpageattr {/Group << /S /Transparency /I true /CS /DeviceRGB>>} and now my images containing transparency are correctly displayed in the final PDF:)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.