# Center image in landscape mode

I've used the \usepackage{pdflscape} instruction and the following code for inserting an image in a landscape oriented page.

\begin{landscape}

\begin{figure}[p!]
\centering
\includegraphics[scale=0.4]{./images/SelectDVA.png}
\caption{DVA selection Use Case.}
\end{figure}

\end{landscape}


This is the outcome:

I'd like the image to be centred vertically and horizontally, put playing with \vspace or \hspace didn't help me.

What is the correct way of doing it?

-
It seems that the image is too big. –  egreg Nov 25 '12 at 15:25
@egreg - but is it possible to move it towards the bottom of the page?In that case the image will go outside of the bottom margin but without any side effect, being there no content... –  Matteo Nov 25 '12 at 15:29
You can try putting \hspace*{-1cm} before \includegraphics –  egreg Nov 25 '12 at 15:30
@egreg - exactly what I needed... ;D will there be any drawbacks in your opinion? –  Matteo Nov 25 '12 at 15:36
The drawback is that you need to hand tune it and that the caption will not be centered with respect to the image. I'd simply say \includegraphics[width=\hsize]{...} (or better yet 0.9\hsize). –  egreg Nov 25 '12 at 15:44

From your picture it seems that the image scaled at 40% is still too wide for the page, so an overfull box is produced (and the excess goes to the right, which is the top of the rotated page).

While adding something like \hspace*{-1cm} (tune the length to your needs) would somewhat cure the problem, the caption would not be centered to the image any more.

Probably you should better do

\includegraphics[width=\hsize]{./images/SelectDVA.png}


or

\includegraphics[width=0.95\hsize]{./images/SelectDVA.png}


to give some more room. Unfortunately, it seems that the real textwidth is not available when using pdflscape (the fault is in lscape from which the former depends), so \hsize should be used.

-