# Inserting a pdf file in LaTeX

Im trying to insert a PDF file in LaTeX and I'm having some problems.

Making a search here I have found several solutions, but none of them is completly working for me.

First of all I tried using \usepackage{pdfpages}, but the programme cant read it and it says "missing \begin{document}" when the order \beign{document} is there.

As it wasnt working for me I tried using:

\begin{center}
\includegraphics[width=1\textwidth]{Fotos/Tablaprueba.pdf}
\end{center}


This way, I achieve inserting the file, but I have another problem. In the page it remains a huge space under the file inserted, and when I write some text down below, it appears several lines after the file inserted, and not immediatelly after. Also, I'd like to insert a caption after the file and I cant do it in that last way I described.

• \includegraphics adds no space. The center environment adds a small amount. Check that the space is not in the pdf that you are including – David Carlisle May 10 at 16:52
• You cannot use \caption except in floats. Change center by table and before \includegraphics add \centering\caption{Mi prueba}\label{prueba}. BTW, use always \linewidth instead of \textwidth to set the width of the images (you will notice the difference working in two columns, for example). Also the "1" can be omitted (is the default). – Fran May 10 at 19:15
• Thank you so much Fran, it worked perfectly. Just one more question. With that enviroment, is there any option to insert one concrete page of the pdf file? – germansin May 12 at 11:01