Graphics, Figures & TablesPDF graphics blank using pdflatex/lualatex

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
sacraig
Posts: 1
Joined: Sun Oct 27, 2013 11:56 pm

PDF graphics blank using pdflatex/lualatex

Post by sacraig »

I am trying to include an image in PDF format into my document as a figure. When compiling with lualatex or pdflatex from MiKTeX in Windows, the image does not appear. If I take that very PDF image and convert it to PNG and include the PNG file, it works. Additionally, when I try the PDF version, the figure has a double light grey line along the edge or corner depending on the viewer used. This does not occur with the PNG version. Using TeXLive in Ubuntu solves the problem, but I need to work in Windows at work, so I need to figure this out on the Windows side of things.

The PDF image is one page from what was originally a 4 page document split into 4 separate images. I tried converting each to EPS and then back to PDF again and it seemed to work for two of the 4 images.

I have used the \fbox command to enclose the \includegraphics command to make sure that the size is being interpreted correctly and it is in all cases, and changing the image size doesn't change anything.

Generally, my compile order is lualatex->bibtex->lualatex->lualatex and I've tried the same thing with pdflatex. I have other PDF files that compile fine but this one has been problematic.

Below is a minimul working example. The preamble is pretty large but I figured I would include everything just to be safe. This is all part of a larger thesis template file for my university, so I can't really go deleting any of the packages either or it breaks the thesis template.

Code: Select all

\documentclass[12pt]{report}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=1.25in,bmargin=1.25in,lmargin=1.4in,rmargin=1.15in}
\usepackage[doublespacing]{setspace}
\usepackage{tocloft}
\usepackage[rm, tiny,center, compact]{titlesec}
\usepackage{indentfirst}
\usepackage{etoolbox}
\usepackage{tocvsec2}
\usepackage[titletoc]{appendix}
\usepackage{appendix}
\usepackage{rotating}
\usepackage[T1]{fontenc}\usepackage{lmodern}
\usepackage[hidelinks,unicode]{hyperref}
\usepackage{amsmath}
\usepackage{graphicx,float,wrapfig}
\usepackage{natbib}

\begin{document}

\begin{figure}[tb]
    \centering
    \includegraphics[width=0.8\textwidth]{AT3-Iso.pdf}
    \caption{Three-dimensional traversing mechanism affixed to 7$^{\circ}$ cone model.}
    \label{fig:traverse}
\end{figure}

\end{document}
Also, I have linked 3 files below. One is sample output from my .tex file with a PDF input, one with a PNG input, and then one is the original PDF image itself that I am trying to use. Hopefully all of this helps.

http://people.tamu.edu/~sacraig/debug/pdf-version.pdf

http://people.tamu.edu/~sacraig/debug/png-version.pdf

http://people.tamu.edu/~sacraig/debug/AT3-Iso.pdf

Thanks in advance if you can help me.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

PDF graphics blank using pdflatex/lualatex

Post by Johannes_B »

Works just fine on my TexLive2013 with ubuntu (well, you mentioned that already). What you did not mention was the TeX-distribution you are using.

Put a \listfiles at the very beginning of yur file (above documentclass{...}) and compare with my package versions:

Code: Select all

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=pdflatex 2013.10.8)  28 OCT 2013 08:29

*File List*
  report.cls    2007/10/19 v1.4h Standard LaTeX document class
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
 lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
geometry.sty    2010/09/12 v5.6 Page Geometry
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
  ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
setspace.sty    2011/12/19 v6.7a set line spacing
 tocloft.sty    2013/05/02 v2.3f parameterised ToC, etc., typesetting
titlesec.sty    2011/12/15 v2.10.0 Sectioning titles
indentfirst.sty    1995/11/23 v1.03 Indent first paragraph (DPC)
etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
tocvsec2.sty    2011/08/07 v1.3 variable ToC section entries
  ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
appendix.sty    2009/09/02 v1.2b extra appendix facilities
rotating.sty    2009/03/28 v2.16a rotated objects in LaTeX
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
 amsmath.sty    2013/01/14 v2.14 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
   float.sty    2001/11/08 v1.3d Float enhancements (AL)
 wrapfig.sty    2003/01/31  v 3.6
  natbib.sty    2010/09/13 8.31b (PWD, AO)
hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX
hobsub-hyperref.sty    2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2012/05/28 v1.13 Construct package bundles (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)
  bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
 hopatch.sty    2012/05/28 v1.2 Wrapper for package hooks (HO)
xcolor-patch.sty    2011/01/30 xcolor patch
atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)
atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)
refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)
 hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
 auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
  pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
   puenc.def    2012/11/06 v6.83m Hyperref: PDF Unicode definition (HO)
     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.
 hpdftex.def    2012/11/06 v6.83m Hyperref driver for pdfTeX
rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
   t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
supp-pdf.mkii
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
 nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)
sacraigPdfImage.out
sacraigPdfImage.out
 AT3-Iso.pdf    Graphic file (type pdf)
  ot1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
  omllmm.fd    2009/10/30 v1.6 Font defs for Latin Modern
 omslmsy.fd    2009/10/30 v1.6 Font defs for Latin Modern
 omxlmex.fd    2009/10/30 v1.6 Font defs for Latin Modern
Just tested with LuaLaTeX, the behaviour you described above appears. Both, with Lua- and pdflatex a warning is there, saying that

Code: Select all

LuaTeX warning (file AT3-Iso.pdf): PDF inclusion: found PDF version <1.6>, but at most version <1.5> allowed
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply