Multi-page pdf in figure environment

I want to include a multi-page pdf file into a figure environment, as it serves as one of the figures in the appendix.

I know that normally one could also use the pdfpages package to include such a file, but I need it to have a caption, just like all my other exhibits.

Therefore I tried the following code, which seems not to work, as the output is only one page:

\documentclass[12pt, a4paper] {article}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{graphicx}

\begin{document}

\begin{figure}[h!]
\centering
\includegraphics[page=1,width=\textwidth] {./ex_janaletter}\\
\includegraphics[page=2,width=\textwidth] {./ex_janaletter}\\
\includegraphics[page=3,width=\textwidth] {./ex_janaletter}\\
\includegraphics[page=4,width=\textwidth] {./ex_janaletter}\\
\includegraphics[page=5,width=\textwidth] {./ex_janaletter}\\
\caption[Jana Partners' Letter to Management Board of QEP Resources]{Letter by Jana Partners to the BOD of QEP Resources on October 21, 2013.}
\label{fig: janaletter}
\end{figure}

\end{document}


With the output as follows:

So pages 2 to 5 seem not to be displayed? What am I doing wrong here?

Any help is highly appreciated, thanks!

• You should use the package pdfpages and its \includepdf command rather – user31729 Jan 9 '15 at 10:06
• as I said, this can not be put into a figure environment as far as I know? Whereas i need it to have a caption. – mt1111 Jan 9 '15 at 10:07
• use the (one line:-) capt-of package than you can use \captionof{figure}{my caption text} anywhere so don't need the figure env – David Carlisle Jan 9 '15 at 10:18
• @DavidCarlisle Do you want to write up an answer? – TeXnician Sep 18 '18 at 14:17