GeneralPackage pdftex.def Error

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
andreas_baldur
Posts: 2
Joined: Tue Apr 12, 2011 11:11 am

Package pdftex.def Error

Post by andreas_baldur »

Hello out there.

For a very long time, I've been trying to get rid of an really annoying error. I have downloaded a nice looking template, where some elements are build up on the package pstricks. The issue is, that i want the output to be PDF. My editor is Texmaker, an when i run the LaTeX, i get the error message:

! Package pdftex.def Error: PDF mode expected, but DVI mode detected!
(pdftex.def) If you are using `latex', then call `pdflatex'.
(pdftex.def) Otherwise check and correct the driver options.
(pdftex.def) Error recovery by switching to PDF mode.

If I then run the pdflatex instead, it runs with the error saying:

! LaTeX Error: You have run the document with pdflatex, but PSTricks
requires latex->dvips->ps2pdf or alternatively the use
of the package `auto-pst-pdf'. Then you can run
`pdflatex -shell-escape <file>' (TeX Live)

How can i get rid of the error.

Best regards,
Andreas

Recommended reading 2024:

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

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

DennyHort
Posts: 2
Joined: Mon Apr 18, 2011 7:57 am

Re: Package pdftex.def Error

Post by DennyHort »

Hi,

I just got the same error. I am not sure if this might be the reason, but I installed the 64bit version of Miktex 2.9. On another computer I still have the 32bit version and the same project does not lead to an error.

Regards
Peter
DennyHort
Posts: 2
Joined: Mon Apr 18, 2011 7:57 am

Re: Package pdftex.def Error

Post by DennyHort »

...sorry, I concluded too early:
In my case the problem is somewhere in between the versions 2.8 and 2.9 of miktex - it had nothing to do with the bit-version.
In particular the error disappeared when I removed the following inlcusion line:

\usepackage{pst-all}

which apparently is ment to be used when compiling to ps. Miktex version 2.8 was OK with including this package, but 2.9 doesn't like it...

Regards
Peter
Post Reply