[Tex/LaTex] Include centered full page figure with no margins

floatsgraphicshorizontal alignmentvertical alignment

I have a big figure that takes up a full page. I'd like to include it in my latex document on a separate page, centered horizontally and vertically.

I managed to put it on a separate page (or it is simply doing that because of the size). Horizontal centering also works using \centerline, even though the figure is wider than the text.

The only problem left is that I can't center it vertically. No matter what I try it won't let me go over the top margin. I tried \vspace*{-2cm} or ${}$\vspace*{-2cm}, but only the caption was moved (onto the figure..).

My current code:

\begin{figure}[p]
    \makebox[\linewidth]{
        \includegraphics[width=1.3\linewidth]{images/sequence2.pdf}
    }
    \caption{Sequence diagram}
\end{figure}

EDIT:

Here is the result (I put a black border around the page, and covered the area of the figure with a gray box). The top margin is slightly larger than the bottom margin. And the figure's caption is below the page number. I'd just like to move the figure and caption up by 1-2 cm.

enter image description here

Best Answer

Another option is to use pdfpages package as reported here.

For this add the following line in the preamble:

\usepackage{pdfpages}

Now you need to create a pdf with exact size of your LaTeX document. For this I used Inkscape, but you can use any other tool. In case you do not know what is the exact size of page in pixels, just open the pdf with Inkscape. This will give you titlepage, you can see the height and width of page in Inkscape. Let's say the size of page is 765x990 pixels. Now resize the image that you want to this size and embed it in this page. Save the file as pdf in Inkscape.

Now in the main LaTeX file use the following command

\includepdf{input.pdf}

I am attaching a screenshot of my document below.

LaTeX Full Page Image

Related Question