GeneralCreating a pdf-file containing graphics

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
barnie
Posts: 6
Joined: Thu Apr 26, 2007 1:20 pm

Creating a pdf-file containing graphics

Post by barnie »

Hi,

I usually compile my tex-files to dvi-files. Now I have to send a document via e-mail which requires in that particular case a pdf-file. But my document contains a huge graphic (almost a full page). The dvi-file contains it and shows it to me (in Yap). But when I compile to pdf, instead of that graphic there is just a blank page\footnote{Of course, there is the caption but not the graphic.}. Do I have to change any LaTeX-Code? Is my Adobe Reader (5.1) to old? What else could be the problem?

barnie

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
aeelmn
Posts: 15
Joined: Tue Apr 10, 2007 4:09 pm

Re: Creating a pdf-file containing graphics

Post by aeelmn »

I think it might be due to the picture format you're using. When compiling to pdf the graphics need to be either jpg, png or pdf.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Creating a pdf-file containing graphics

Post by localghost »

You neither write your way of compilation nor do you mention the (MiKTeX) system you are using. So i assume you are using MikTeX 2.5 (with TexnicCenter) and you try to compile your document with "LaTeX => PS => PDF". So you don't need to convert your graphics file(s).

The problem in this case is the dvips converter. One parameter is set differently than in the past. The described problem occurs only when giving absolute paths for the graphics files. You can avoid that problem by setting this parameter when executing dvips.

Code: Select all

dvips -R0 "%Bm.dvi"
Adapt all your output profiles in TeXnicCenter which work with dvips in the post process. Although there is no problem with your Adobe Reader, you should think about updating it.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
barnie
Posts: 6
Joined: Thu Apr 26, 2007 1:20 pm

Creating a pdf-file containing graphics

Post by barnie »

localghost wrote: You neither write your way of compilation nor do you mention the (MiKTeX) system you are using.

Sorry, you're right. I took the wrong "general"-Link. Should have been the MikTex one...
localghost wrote: So i assume you are using MikTeX 2.5

Almost - it'e 2.4 because 2.5 didn't work after downloading for 2 hours (I still connect to the internet with a 56k modem...)
localghost wrote: (with TexnicCenter)

Yes. 1 Beta 6.31 ('Firenze')
localghost wrote: and you try to compile your document with "LaTeX => PS => PDF".

The profile is called "LaTeX => PDF" -- in case that's more than an abbrevation.
localghost wrote: dvips -R0 "%Bm.dvi"

It's an 0 (number) not an O (letter), right?
localghost wrote: Adapt all your output profiles in TeXnicCenter which work with dvips in the post process.

That's only the "LaTeX => PS"-profile, and unfortunately nothing changed. Still the same problem. But luckily I now know, how my father feels when Word (acutally he himself...) is doing sth strange :-/

BTW: I noticed a difference between the compiling processes. While there is no special commentary on page 4 (where the first graphic should appear) while compiling to DVI or PS, it says [4 Non-PDF special ignored!] while compiling to PDF.
localghost wrote: Although there is no problem with your Adobe Reader, you should think about updating it.

Well, I already thought about it. And after downloading for hours the update began and finished with "does not work on your system" (Win98SE). A faster connection would be the better decision I suppose.

Thanks for your help.

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

Creating a pdf-file containing graphics

Post by localghost »

Now that we know your operating system and your MiKTeX system, my hints are obsolete. You can follow the advice of aeelmn. pdflatex doesn't accept files in EPS format. You have to convert them into JPG, PNG, or at least PDF when using the output profile "LaTeX => PDF".

If you don't want to do that, use the output profile "LaTeX => PS => PDF" instead (as i mentioned above). In this case it's the easiest way. Your document will be compiled with latex to DVI (as you are used to), then be converted to PS by dvips (without the mentioned parameter) and is further converted to PDF by ghostscript. For that it is necessary to have ghostscript (and maybe GSview) installed.

Keep your version of the Adobe Reader. As far as i know it is the last version to run on Windows 98(SE). You may try version 6, but i don't know if it works.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply