To set paper size with LaTeX it is necessary to set the paper size in both the document class and also in the geometry line. One of these changes the layout of the document to fit an a4 page, the other sends a message to the pdf generating toolchain to change the page size.
\documentclass[a4paper]{article} \usepackage[a4paper]{geometry} \begin{document} Your document here \end{document}