I've generated the following PDF using pdflatex: https://ofir.io/train_short_test_long.pdf

It can be viewed perfectly fine if opened in the Chrome PDF viewer or in Preview in Mac OS X, but if I open it in Adobe Acrobat Reader I get the following error:

An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem.

And what happens is that most of the PDF looks totally fine in Acrobat but the following figures are not displayed: 4,5,6,7(b),10

Which is very weird since I used the same software (matplotlib) to generate all the figures. And I use identical graphicx commands to include all figures in the document.

This problem still occurs even when I compile with LuaLaTex. Those figures are all PDF files themselves, and if I open just the figure in Adobe it works fine. When compiling the PDF there's no errors and just 1 warning about a table. Lastly, I've heard from a user of OneNote that a similar error occurs when the PDF is opened there.

Thanks so much!

  • 1
    With evince, I get the following error message: invalid value for a dash setting... Aug 28, 2021 at 5:47
  • 1
    With ghostscript, I get the following error messages: Form stream has unbalanced q/Q operators (too many q's) and Form stream left garbage on the stack, attempting to recover. (on each invalid pictures). Aug 28, 2021 at 5:50
  • Thanks so much, that's definitely more information than I had before. But its not clear what the workaround is, are you aware of any? I've been googling these error messages and can't really find a solution yet. One thing I might try is to export these images in a different format because it seems like the PDF format here might be the issue.
    – Ofir P
    Aug 28, 2021 at 7:34
  • Not all Acrobat Readers are the same ... To localize the error I suggest this procedure on a dedicated Latex copy: 1) Divide your code into two parts A and B. 2) Delete A, compile, check with several Acrobat Readers, and repeat with B as well. 3) Repeat with the part that contains erros (can be both parts). // Converges quickly with 2^n ... // Don't forget to try an empty \begin{document} \end{document}, and to comment out some or many \usepackage declarations. // Purpose is to find hints quickly.
    – MS-SPO
    Aug 28, 2021 at 10:24
  • 1
    This looks very much like matplotlib is generating corrupt PDFs. Can you share the code to create one of the broken figures? Aug 29, 2021 at 20:23

1 Answer 1


If you have Abode Acrobat Pro on your mac, it is easy.

  1. Open simply in Preview in your mac.
  2. Select File - Print.
  3. Select PDF - Create Adobe PDF.

That is it.

  • This is just a workaround. This does not correct the errors actually present in the PDF... And there is no guarantee that this workaround produces the expected result. Apr 13, 2022 at 8:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .