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 dealing with an annoying behaviour of my pdf file. It seems that Acrobat or Reader doesn't recognize the images. I work with texlive on Ubuntu 11.04 and I compile the source file with pdftex in texmaker. The strange thing is that on my machine the pdf is fine, I can open it and see all the text and images correctly with evince and with Pdfxchange viewer running under wine. But if I switch to Windows with Acrobat or Reader I have this problem.

Does anyone have any clue? I'm using \pgfimage to generate the figures in my document.

MWE:

\documentclass[a4paper, oneside, 12pt]{book}
\usepackage{pgf}

\begin{document}

\begin{figure}[h]
\includegraphics[width=\textwidth]{image.png}
\end{figure}

\newpage

\begin{figure}[h]
\pgfimage[interpolate=TRUE, width=\textwidth]{image.png}
\end{figure}

\newpage

\begin{figure}[h]
\pgfimage[width=\textwidth]{image.png}

\end{figure}

\end{document}
share|improve this question

closed as too localized by Joseph Wright Aug 5 '12 at 8:18

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
With "Acrobat or Reader" you mean "Adobe Acrobat" (the "full" version) or "Acrobat Reader", don't you? What is displayed instead of the images? Is the place simply kept empty? Could you upload the PDF somewhere, if it isn't confidential, so we could have a look at it? The PDF (not 'pdf') format is supposed to be platform-independent so I'm surprised to hear about this issue. What kind of images are you using? JPEG, PNG or PDF? –  Martin Scharrer Sep 14 '11 at 12:38
    
Yes, Acrobat is the full version, Reader is the light one. With both I have the same problem. When I reach a page with a graphic it gives me the error 'There was an error processing a page. There was a problem reading this document (110), which is a quite general message... The images are embeded with the command \pgfimage[interpolate=TRUE, width=\textwidth]{} and they are .png. You can check the file here: dl.transfer.ro/transfer_ro-13sep-a34a0086a308e8b0.zip . It's a report in Romanian. –  Mihai Terente Sep 14 '11 at 14:55
1  
I can't display the images using Adobe Reader 9.4.2 under Ubuntu Linux 11.04 as well. I get the same error as soon I scroll to page 4 which holds the first image. However, Evince, a free PDF viewer, displays the document correctly. I tried to run the PDF through pdftk to correct any errors in the file but didn't got any warnings and the resulting files caused the same errors. Maybe try without the interpolate option or with \includegraphics instead. –  Martin Scharrer Sep 14 '11 at 15:31
    
(cont.) If this doesn't help make a minimal working example (MWE) that causes this issue and post it here. –  Martin Scharrer Sep 14 '11 at 15:31
2  
You might want to mention that http://dl.transfer.ro/transfer_ro-13sep-a34a0086a308e8b0.zip is about 29 MB huge. (Or replace by a smaller minimal example.) –  Stephen Sep 17 '11 at 10:40

1 Answer 1

PDF-Viewer incompatibilities seem to become a major nuisance of the Portable Document Format these days. It's a shame!

A workaround that has worked for me in the past is to pipe the PDF through Ghostscript for some sanitation:

 gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=foo-compressed.pdf foo.pdf

Originially, I have used this only for compression purposes. However, in my experience it solves many problems with peculiar PDF viewers, especially if one uses PGF quite a lot.

I was not able to test it with your example document (the download link was to instable), but you may want to give it a try.

share|improve this answer
    
In this case ghostscript internally converts the PDF to PostScript and then distills it to PDF. It works, but you lose quite a lot of information from the PDF. –  Martin Schröder Oct 21 '11 at 20:06

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