# Why do LaTeX and pdflatex produce different margins?

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.

\documentclass[a4paper,12pt]{article}

\begin{document}
text

\end{document}

-
I can't reproduce the problem. Compare this and this. Could you provide a minimal working example? –  Nils L May 1 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 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 at 15:59
I guess you are using MikTeX. You need to pass -sPAPERSIZE#a4 to ps2pdf to get the same margin.