Graphics, Figures & TablesFigures good for .dvi wrong for .pdf

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
spurta
Posts: 10
Joined: Sat Oct 24, 2009 11:36 am

Figures good for .dvi wrong for .pdf

Post by spurta »

Hi I have just upgraded to Miktex 2.8 and now the .png's appear small and in the bottom corner as if the bounding box is the wrong size when viewing as a pdf. The pictures appear fine in yap, but not in .pdf, I have to submit in .pdf so this is a problem. It was working with the older Miktex 2.4 I had previously. I have tried all options in Quick Build on TexMaker to get to pdf and all except the one including ps, which makes it black and white, have the same error. Here is the code I have been using, and it has been working fine until the upgrade:

Code: Select all

\begin{figure}[h]
\begin{center}
\includegraphics[scale=0.4, bb = 0 0 535 330]{xxxx.png}
 \vspace{-3mm}\caption{\small{caption}} \label{key}
\end{center}
\end{figure}
\FloatBarrier
Help please, Leon.

Recommended reading 2024:

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

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

spurta
Posts: 10
Joined: Sat Oct 24, 2009 11:36 am

Figures good for .dvi wrong for .pdf

Post by spurta »

I solved my own problem by using dvipdfm in the document class:

Code: Select all

\documentclass[oneside,11pt, dvipdfm]{report}
and
dvips with the graphicx:

Code: Select all

\usepackage[dvips]{graphicx}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Figures good for .dvi wrong for .pdf

Post by localghost »

That doesn't make any sense at all. The latex compiler engine doesn't accept files in PNG format. Neither with nor without these useless driver options. And bounding boxes don't exist for PNG files. I would like to see a minimal working example (MWE) where a PNG file is included properly when running the latex compiler engine.


Best regards
Thorsten
Post Reply