I'm new to pdfLaTeX so i could be missing something very obvious, i have looked at a few solutions none of which have worked for me.
i have a figure which is a rather large image which needs to maintain is caption and fit with the page. The image fits onto a landscape a4 page, however not matter what i have tried thus far latex renders the image from the center of the page so the figure overflows the edge of the paper.
i assume its something to do with the fact that i am using 1 landscape page when the rest are portrait so it maybe an issue with margin configuration.
heres the corresponding snippet which contains the problem(ignore the caption):
\documentclass[10pt,a4paper]{article}
\usepackage[margin=1.2in]{geometry}
\usepackage{graphicx}
\usepackage{pdflscape}
\begin{document}
\begin{landscape}
\begin{figure}[ht]
\centering
\label{fig:singleton}
\includegraphics[scale=0.8]{class-diagram}
\caption{Proposed high level implementation of the Singleton pattern}
\end{figure}
\end{landscape}
\end{document}
I have scaled the image to 0.8 just so its more clear where the figure is being rendered.
This is the current output:
This is the desire outcome:
This is the image being used for the figure
Hopefully it is clear what the problem is.