1

I am using Windows 8, Texmaker 4.5 and Miktex 2.9.

When compiling Latex, Dvi2ps and ps2pdf, I have a problem of papersize. My miktex option is A4 Paper. When compiling, the dvi and ps files are a4, but the pdf is letter. I use the option ps2pdf -sPAPERSIZE#a4 %.ps %.pdf which does not change anything.

When compiling pdflatex I do have a4 paper.

Could you help me get a A4 paper when using ps2pdf ?

Thank you

  • Confused by this... Are you setting paper size in your LaTeX code? for example, the package geometry can do that. – Ryan Dec 20 '16 at 18:55
  • 1
    You should use -sPAPERSIZE=a4. – Werner Dec 20 '16 at 19:03
  • @Werner: not for a Windows user – user2478 Dec 20 '16 at 19:06
  • I am using the package geometry, and setting the paper size in obvious places : \documentclass[a4paper,10pt]{article} – MJii Dec 20 '16 at 19:23
  • 4
    I'm voting to close this question as off-topic because because it is solved by comments. – Zarko Feb 20 '17 at 19:23
1
\documentclass{article}
\usepackage[dvips,a4paper]{geometry}
\begin{document}
    foo
\end{document}

has a4 in the pdf:

voss@shania:~$ pdfinfo zz.pdf
Title:          zz.dvi
Creator:        dvips(k) 5.996 Copyright 2016 Radical Eye Software
Producer:       GPL Ghostscript 9.18
CreationDate:   Tue Dec 20 20:02:50 2016
ModDate:        Tue Dec 20 20:02:50 2016
Tagged:         no
UserProperties: no
Suspects:       no
Form:           none
JavaScript:     no
Pages:          1
Encrypted:      no
Page size:      595 x 842 pts (A4)
Page rot:       0
File size:      3846 bytes
Optimized:      no
PDF version:    1.5

If your DVI configuration has the letter format preset, then you may need a

dvips -t unknown filename.dvi
| improve this answer | |
  • Thank you, but this does not work. I get the pdf : – MJii Dec 20 '16 at 19:10
  • PDF Producer: MikteX GPL Ghostscript 9.05 PDF Version : 1.4 Page Size : 8.50 x 11.00 in – MJii Dec 20 '16 at 19:11
  • try dvips -t unknown filename.dvi and then ps2pdf filename.ps – user2478 Dec 20 '16 at 19:39
  • Look at the .ps file, line 9 or so. You should have DocumentPaperSizes: a4. B.t.w., you should update MiKTeX: present version of MiKTeX GPL Ghostscript is 9.19. – Bernard Dec 20 '16 at 19:47

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