Graphics, Figures & TablesOutput to DVI but not to PDF

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
coast
Posts: 6
Joined: Sat Jul 09, 2011 9:49 pm

Output to DVI but not to PDF

Post by coast »

hi,
I would like to insert images into my documents and have been able to do this by outputting to dvi format, but it doesn't work with pdf. When I output to pdf the image is missing:

Code: Select all

\usepackage{graphicx}
.
.
.
\newpage
\section{Diagram}
\begin{figure}
\centering
\includegraphics[scale=0.65, angle=90]{testing}
\caption{System}\label{fig:test}
\end{figure}
Can anyone give me some clues or refer me to a tutorial on how to solve this?

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Output to DVI but not to PDF

Post by localghost »

Check the log file for warnings and errors. A bit more useful information about the format of your graphics file can't do any harm. PDFLaTeX accepts external files in the formats JPG, PNG or PDF.


Best regards and welcome to the board
Thorsten
coast
Posts: 6
Joined: Sat Jul 09, 2011 9:49 pm

Output to DVI but not to PDF

Post by coast »

There are no warnings or errors in the log file. I'm importing an .eps image as instructed to by this tutorial:
http://www.andy-roberts.net/misc/latex/ ... rial5.html

Do you think I should use another method?

Thank you for your warm welcome.

Coast
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Output to DVI but not to PDF

Post by localghost »

Forget about this tutorial. It only covers LaTeX and not PDFLaTeX. As I already mentioned (indirectly), PDFLaTeX does not accept EPS files by default. If you are running the current version of a common TeX distributon (MiKTeX 2.9, TeX Live 2010), you can include EPS figures when running PFDLaTeX on your document. The EPS files are then converted to PDF in the background. If you have an older version of these distributions, you need to use the epstopdf package. If the problem persists, submit a true minimal example along with its complete log file (as attachment).
User avatar
shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Output to DVI but not to PDF

Post by shadgrind »

You could convert your DVI file to PDF by first converting to PS. In Linux you'd do it like this:

Code: Select all

dvips -Ppdf -G0 -z yourfile.dvi
ps2pdf14 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -dPDFSETTINGS=/printer yourfile.ps
This way you can use EPS graphics without needing to convert them first.
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2
Post Reply