# How to include a PDF file in LaTeX but actually include the pages as pdf pages and not a figure

I have another pdf file and I need to paste it into my current LaTeX document. I know about \includepdf but the problem is that the pdf looks like a figure that's being included. I don't want a figure. I want the pages to be the pdf. It should look like something from using pdfshuffler, or pdftk. How can I do this using LaTeX code?

\documentclass[12pt]{article}
\usepackage{pdfpages}

\begin{document}

Whatever.
More stuff

\includethepdfpagesherenotasafigure
\end{document}

• You can't merge a pdf with the pdf pdftex is currently creating. With luatex it is perhaps possible, but it would involve lots of low level pdf manipulations. Use ghostscript or pdftk or a similar tool. Nov 1, 2019 at 8:45

That functionality is provided by the pdfpages package (read its documentation to see how to include specific pages, change page orientation, etc.).

\documentclass{article}
\usepackage{pdfpages}
\begin{document}
Whatever.
\includepdf{file.pdf}
\end{document}

• This still includes the pdf as if it were making a figure. Look at this question [askubuntu.com/questions/2799/how-to-merge-several-pdf-files] and see the answer. That is what I mean when I say I want to include a PDF. Nov 1, 2019 at 2:02
• I don't understand how this is different from what pdftk does. The content of file.pdf is included as separate pages in the output file; it's not included in the same way as a figure. Nov 1, 2019 at 11:30
• \includepdf basically does \includegraphic internally, so it is coded as an included image, even though it doesn't look like one. At least, I think.
– cfr
Dec 1, 2019 at 3:37