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.



  • 1
    I can't reproduce the problem. Compare this and this. Could you provide a minimal working example?
    – Nils L
    May 1, 2013 at 10:56
  • 1
    Probably the page format is different (letter versus a4). And yes you can avoid it by passing the correct options. May 1, 2013 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, 2013 at 15:59

1 Answer 1


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

  • @OP, just to inform: configure TeXstudio and insert the option suggested above on the command line of ps2pdf.
    – Sigur
    May 1, 2013 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .