8

I am compiling a Beamer presentation on Ubuntu using PDF figures output from Inkscape. The colors on certain slides are wrong. This appears to be caused by including certain figures, and based on my inspection the presence of translucent and transparent objects may be the culprit.

An important clue is that I have the following lines at the top of my document

\let\mypdfximage\pdfximage
\def\pdfximage{\immediate\mypdfximage}

These lines were necessary to solve a separate bug discussed here (pdflatex: Too many open files). Removing these lines from the minimum working example seems to resolve the issue, but these lines are required to build the full presentation correctly.

This is not a duplicate of this question, as neither the \pdfpageattr nor the \usepackage[cmyk]{xcolor} solutions work. It is likely related to this question. Converting the offending PDFs using the gs -o fixed-image.pdf ... solution presented here also does not work. Running the PDFs through pdf2ps and then ps2pdf resolves the color issue, but rasterizes the figures and leading to (1) unpresentable quality (2) long slide load times with visible flickering during redraw. I am also seeing the warning multiple pdfs with page group included in a single page described here, which may be related. In other forums there is an argument that the incorrect color output is a bug in Adobe Reader, but I believe this must be treated as a bug in pdflatex. IIRC, Adobe Reader is poorly supported on Linux, but because it is the only viewer that can display \animategraphics commands, we need pdflatex to generate output that it can accept.

I've obtained a minimum working example, but I need to know how to attach files (in this case the offending PDF in question) to StackOverflow posts to complete it. I'll work on looking up how to do this, but for now here is the code:

\let\mypdfximage\pdfximage
\def\pdfximage{\immediate\mypdfximage}
\documentclass{beamer}
\usepackage[english]{babel}
\usetheme{Rochester}
\begin{document}
    \title   {Linux Adobe Reader 9 Color Bug Demo}
    \author  {}
    \subtitle{}
    \date    {}
    \begin{frame}\titlepage\end{frame}
    \begin{frame}{Color mismatch}
        \includegraphics{./test_figure_2.pdf}
    \end{frame}
\end{document}
MRule
  • 679
  • I think I have had problems like that with Inkscape-generated PDFs that contain transparencies also in another context (paper writing). However, this was a couple of years ago, so I don't remember all the glory details. IIRC, I "solved" it by rasterizing, which for you apparently is not an option. However, I never have had any difficulties like that with PDFs from other GFX apps, it appears to be Inkscape not working well with pdflatex. – Daniel Feb 18 '16 at 21:23
  • What i find strange is that the colors are fine until the \immediate\pdfximage macro is added. I feel like what's happening is that this solution for the Too many open files error is interfering with graphics output. I would expect the true solution is a much more complex version of the \immediate\pdfximage macro, but I don't have the skills to code this (and the fact that I might have to indicates a bug in pdflatex or one of the packages, in my opinion) – MRule Feb 18 '16 at 21:42
  • Which version of pdfTeX do you use? Does the problem also appear with other viewers (like okular)? – Martin Schröder Feb 19 '16 at 00:31
  • 1
    Hi Martin, The problem is confined to Adobe Reader on linux. Okular and Evince render colors correctly, but can't display animations and therefore can't be used for the talk. The pdfTeX version appears to be π-2.5-1.40.14. – MRule Feb 19 '16 at 03:34
  • 4
    I'm voting to close this question as off-topic because, without a test file, it is almost impossible to reproduce the problem. – Symbol 1 Mar 28 '17 at 19:51
  • How do I upload a test file on this forum? – MRule Mar 29 '17 at 20:34

0 Answers0