1

Why is this code not producing a landscape pdf page when compiled with LaTeX->dvips->ps2pdf? Checking the resulting ps file shows that it is not in landscape either.

\documentclass{article}
\usepackage{graphicx}
\usepackage[letterpaper,landscape,left=1in,right=1in,top=1in,bottom=1in]{geometry}

\pagestyle{empty}
\parindent 0in

\begin{document}

\centerline{\includegraphics[height=\textheight]{example-image-a.eps}}

\end{document}
  • works fine for me. Is your tex system up-to-date? – Ulrike Fischer Aug 17 at 21:01
  • 3
    There is a command dvi2ps in some distribution. However, geometry does not support the dvi2ps. You have to use dvips instead of dvi2ps. I think that there is no reason to use dvi2ps in these days. – Akira Kakuto Aug 17 at 21:23
  • Off-topic: The options left=1in,right=1in,top=1in,bottom=1in can be stated more succinctly as margin=1in. – Mico Aug 18 at 0:44
  • @ Akira Kakuto, I actually use dvips. I misstated earlier. @Ulrike Fischer I forgot that I have an old system with MiKTeX 2.9. It works fine on that laptop. But, on the newest MiKTeX installation, I still get the portrait. I updated the question with more information. – wdacda Aug 18 at 6:45
  • Is there a specific reason you use dvips, ps2pdf rather than just compiling with pdflatex, or is it just an old habit? Going via dvi is generally considered outdated today — compiling direct to pdf is much more robust and produces better output. – Peter LeFanu Lumsdaine Aug 18 at 7:55
4

I tested this file on an old MiKTeX 2.9 installation and it works well. It produces a pdf file in the landscape orientation. dvips in this installation is from 2011-07-29, 249 KB.

However, I just installed the newest version of MiKTeX 20.7 and it produces a pdf file in the portrait orientation.

I identified that the problem is with WinEdt. When I call dvips from WinEdt I get a ps file in portrait; when I run dvips from the command prompt I get a ps file in landscape. Looking into the WinEdt settings on the new installation in "Console Applications" settings for dvi2ps in the item "Paper Size and Orientation" one must select "Default". The wrong output was the result of the selection of the "Letter" option in the item "Paper Size and Orientation".

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.