TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working with TeXStudio on Windows. When I use latex + dvips + ps2pdf and pdflatex the margins in the resulting PDF file are different.

Has anyone else encountered this? Is there a way to avoid this?

The code below produced different margins at the top of the page.



share|improve this question
I can't reproduce the problem. Compare this and this. Could you provide a minimal working example? – Nils L May 1 '13 at 10:56
Probably the page format is different (letter versus a4). And yes you can avoid it by passing the correct options. – Ulrike Fischer May 1 '13 at 11:06
It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The StackExchange staff can merge them together for you. – Werner May 1 '13 at 15:59

I guess you are using MikTeX. You need to pass -sPAPERSIZE#a4 to ps2pdf to get the same margin.

share|improve this answer
@OP, just to inform: configure TeXstudio and insert the option suggested above on the command line of ps2pdf. – Sigur May 1 '13 at 13:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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