question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot display figure in a pdf file generated with pdflatex

See original GitHub issue

Attach (recommended) or Link to PDF file here:

from_pdftex.pdf

slice2.pdf

Configuration:

  • Web browser and its version: Firefox 68.0.1 and Google Chrome 76.0.3809.87
  • Operating system and its version: macOS High Sierra 10.13.6(17G8030)
  • PDF.js version: 2.2.228 beta
  • Is a browser extension: No

Steps to reproduce the problem:

  1. Load the attached pdf file, from_pdftex.pdf, with PDF.js.
  2. Figure 1 is blank.

figure 1 blank

What is the expected behavior? (add screenshot)

Figure 1 should be displayed as Adobe Reader displays.

2019-08-05 20 47 53

  • The pdf file, from_pdftex.pdf, is generated with pdflatex.
  • The figure, slice2.pdf, included in the pdf file is a pdf file created with Affinity Designer.
  • First reported by @rubendsa at James-Yu/LaTeX-Workshop/issues/1577.
  • Notice that PDF.js can display slice2.pdf itself.

A source TeX file:

\documentclass[12pt]{article}
\usepackage{graphicx}

\begin{document}

\begin{figure}[h]
\begin{center}
\includegraphics[height=1in]{slice2.pdf}
\caption{\textit{Locations of the neutral point ($X_{NP}$) and center of gravity ($X_{CG})$ of an individual wing segment. }}
\label{fig:test2}
\end{center}
\end{figure}

\end{document}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Snuffleupaguscommented, Aug 6, 2019

This is fixed by the pull request above.

Please also report it to the maintainer of the PDF generator as well, so that this is fixed properly, since the PDF file is actually corrupt (the /CS entry in the Group dictionary points to a non-existent object).

0reactions
timvandermeijcommented, Aug 6, 2019

Thank you both, also for reporting this. This is fixed by the pull request above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why can't pdflatex print EPS figures? - LaTeX Stack Exchange
The images in my paper are in EPS format. If I execute pdflatex to get a PDF version of my paper, the figures...
Read more >
No display of PDF output - LaTeX.org
I can't view pdf files, tried everything, it says :'This file cannot be found' or it is simply a blank page. I know...
Read more >
Images not showing up - Overleaf, Online LaTeX Editor
Occasionally, issues with the Overleaf PDF viewer may cause images to not appear in the preview—although if everything is correct in the code,...
Read more >
Problems with Building and Viewing PDF Files from LaTeX
1. Check the log file carefully. Possibly there is an error which is preventing it finishing the document correctly. 2. Check that you...
Read more >
How to create a PDF/A file with LaTeX
A PDF/A file must contain all the information needed for displaying and printing the document. This includes text, graphics, fonts and colour information....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found