# Math Help - Inserting a PDF document into Latex

1. ## Inserting a PDF document into Latex

Here is what I have:

\documentclass{article}
\usepackage{graphicx}

\documentclass{article}
\usepackage{graphicx}
\usepackage{pdfpages}

\begin{document}
\includepdf{Topics}
\end{document}

I have been trying to insert a PDF document into Latex without any success. I have used both TexMaker and WinEDT. When I am using a PDF file, I make sure to compile using "PDFLatex", but it simply is not working. It gives me the error:

! Package pdfpages Error: Cannot find file Topics'. See the pdfpages package documentation for explanation.
Type H <return> for immediate help.
...

But I can assure you that both files Topics.pdf and Topics.eps exist and are on my computer.

I have even tried to use the eps file and I compiled using "Latex" . It compiles it, but the result is not what I am expecting, it just gives me 2 pages , one with the words 2 pdf.2 and the 2nd page has an empty frame with the words \AM@currentdocname .png

Any idea why this is not working properly?

2. ## Re: Inserting a PDF document into Latex

Originally Posted by math8
Here is what I have:

\documentclass{article}
\usepackage{graphicx}

\documentclass{article}
\usepackage{graphicx}
\usepackage{pdfpages}

\begin{document}
\includepdf{Topics}
\end{document}

I have been trying to insert a PDF document into Latex without any success. I have used both TexMaker and WinEDT. When I am using a PDF file, I make sure to compile using "PDFLatex", but it simply is not working. It gives me the error:

! Package pdfpages Error: Cannot find file Topics'. See the pdfpages package documentation for explanation.
Type H <return> for immediate help.
...

But I can assure you that both files Topics.pdf and Topics.eps exist and are on my computer.

I have even tried to use the eps file and I compiled using "Latex" . It compiles it, but the result is not what I am expecting, it just gives me 2 pages , one with the words 2 pdf.2 and the 2nd page has an empty frame with the words \AM@currentdocname .png

Any idea why this is not working properly?
I am assuming that it is a typo that you are repeating the document class and graphix package.

try adding the .pdf extention to the document and make sure it is in the same directory as the .tex file.

I was able to complie using this code in TexNicCenter

\documentclass{article}
\usepackage{graphicx}
\usepackage{pdfpages}

\begin{document}

This is a test.

\end{document}

It put this is a test on the first page and then inserted the .pdf on the next page.

3. ## Re: Inserting a PDF document into Latex

Yes, the first two lines were a typo.
Thanks a lot I put the pdf document in the same directory as the .tex file, and it's basically working now for " \documentclass{article} " .

The only problem, is that, I actually needed this for a " \documentclass{beamer} " type of document for a powerpoint presentation, and when I use the same thing, it doesn't work anymore. The slide which is supposed to contain the pdf document comes out blank.

Here is what I have:

\documentclass{beamer}
\setbeamertemplate{footline}[frame number]
\setbeamercovered{transparent}
\usepackage{graphicx}
\usepackage{color}
% Theme for beamer presentation.
\usepackage{beamerthemesplit}
\usepackage{makeidx}
\usepackage{latexsym}
\usepackage{amsthm}
\usepackage{verbatim}
\usepackage[tikz]{bclogo}
\usepackage{pdfpages}

\title{Hello}
\begin{document}

\begin{frame}
Frame 1
\end{frame}

\begin{frame}
\includepdf{Topics}
\end{frame}

\end{document}

4. ## Re: Inserting a PDF document into Latex

I don't know why it is not showing up in the beamer class, but this may work as a work around

\begin{figure}[h]
\centering
\end{figure}

This will insert the .pdf file as an image.

Let me know if this works for you. I will see if I can think of anything else.

TES

5. ## Re: Inserting a PDF document into Latex

This actually works! Thanks

6. ## Re: Inserting a PDF document into Latex

Originally Posted by math8
This actually works! Thanks
Cool. I am glad it works