Page LayoutHow to set margins to 0 with includegraphics?

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
amdx64bt
Posts: 5
Joined: Mon Feb 08, 2010 2:10 am

How to set margins to 0 with includegraphics?

Post by amdx64bt »

I would like to include a graphic filling all the page. This page has margins. I would like to set this margins to zero only when I include the image.

How I can merge this:

Code: Select all

\usepackage[includeheadfoot,top=0mm,bottom=0mm,left=0mm,right=0mm,headsep=0mm,footskip=0mm]{geometry}
With this:

Code: Select all

\includegraphics[width=\textwidth,page=1]{contents/srs}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

How to set margins to 0 with includegraphics?

Post by Stefan Kottwitz »

You could use the pdfpages package:

Code: Select all

\usepackage{pdfpages}
...
\includepdf{filename}% instead of \includegraphics
This also works with PNG and JPG graphics.

Or, use the commands \newgeometry and \restoregeometry of the geometry package, or a package for absolute placement on the page.

Stefam
LaTeX.org admin
Post Reply