[Tex/LaTex] How tonclude PDF as a Figure in Landscape Mode

captionsfloatsgraphicslandscape

I am trying to insert a single PDF page into LaTeX, but to also 1) have it in a figure and 2) have the page it is on be in landscape mode. (For the latter, see https://stackoverflow.com/questions/2524389/latex-including-a-landscape-pdf)

Here is something less than a MWE, but it should hopefully get the point across as the code is very simple:

\usepackage{pdfpages}
\usepackage{lscape}
...

\begin{landscape}
\begin{figure}
\caption{Title of the Figure}
\includepdf[landscape=true]{\dir/nameofpdf.pdf}
\end{figure}
\end{landscape}

The issue that I am running into is that the the Figure *: Title of the Figure caption does not appear at the top of the PDF figure, but smack dab in the middle.

I am open to other workarounds – I am not married to the packages/code that I have, but I would like to use a PDF, and have it be rotated and in landscape mode (including the caption).

Best Answer

Maybe you can use environment sidewaysfigure from package rotating:

\documentclass{article}
\usepackage{rotating}

\usepackage{mwe}% for dummy text and the example image
\begin{document}
\Blindtext
\begin{sidewaysfigure}
\caption{Title of the Figure}
\includegraphics[width=\textwidth]{example-image-a4-landscape}
\end{sidewaysfigure}
\Blindtext
\end{document}

enter image description here