Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inserting a PDF file in LaTeX

Tags:

include

pdf

latex

I am trying to insert a PDF or doc file as an appendix in my LaTeX file. Do you know how I can do this?

like image 275
Guido Avatar asked Apr 29 '10 16:04

Guido


People also ask

Can you insert a PDF into LaTeX?

Insert PDF as a box in LaTeX To do so, we can use the common graphicx package and its \includegraphics command, with the difference that instead of inserting an image we will be inserting a PDF document.

How do I upload a PDF to overleaf?

Once you drop your file or select it in your file browser you will be redirected to the editor, where a new project will be created with the same name as the . zip file. After that you can start editing, click Recompile to render the PDF.


2 Answers

Use the pdfpages package.

\usepackage{pdfpages} 

To include all the pages in the PDF file:

\includepdf[pages=-]{myfile.pdf} 

To include just the first page of a PDF:

\includepdf[pages={1}]{myfile.pdf} 

Run texdoc pdfpages in a shell to see the complete manual for pdfpages.

like image 60
Mica Avatar answered Sep 18 '22 23:09

Mica


For putting a whole pdf in your file and not just 1 page, use:

\usepackage{pdfpages}  \includepdf[pages=-]{myfile.pdf} 
like image 39
RobinAugy Avatar answered Sep 17 '22 23:09

RobinAugy