section about importing pdf-files into latex file
This commit is contained in:
38
README.md
38
README.md
@@ -410,3 +410,41 @@ This is a text for this header.
|
||||
|
||||
\input{<FILEPATH_5>}
|
||||
```
|
||||
|
||||
## Importing external pdf's
|
||||
|
||||
Importing pdfs is especially interesting for attaching sources to your documentation. The most practical way is to use a
|
||||
special configuration of the `\includegraphics` command.
|
||||
|
||||
```latex
|
||||
\includegraphics[height=0.9\textheight]{<PDF_FILEPATH>}
|
||||
```
|
||||
|
||||
With this configuration you also have enough room to add a header above the included pdf.
|
||||
|
||||
### Importing a selection of pdf pages
|
||||
|
||||
There is a possibility to import only two pages of a pdf into your document. Use the following configuration for this:
|
||||
|
||||
```latex
|
||||
\includepdf[pages={<PAGE_RANGE>}, noautoscale=true, scale=0.9, pagecommand={\thispagestyle{fancy}}]{<PDF_FILE_PATH>}
|
||||
```
|
||||
|
||||
In page range its possible to use a number-range. To include from the first to for example 3rd page you can also use the
|
||||
keyword `first`. The same is possible with the last page by using the keyword `last`.
|
||||
|
||||
### Importing the whole multipage pdf document
|
||||
|
||||
To import a full pdf document with multiple pages, you need a combination of the above standing commands. This is
|
||||
because if you want to have a title above the first page, you need to make space for the title. With the
|
||||
`\includegraphics` command, we make that space by making the height of the float smaller.
|
||||
|
||||
So to import multiple pages of the same document, use the following syntax:
|
||||
|
||||
```latex
|
||||
\includegraphics[height=0.9\textheight]{<PDF_FILEPATH>}
|
||||
\includepdf[pages={2-last}, noautoscale=true, scale=0.9, pagecommand={\thispagestyle{fancy}}]{<PDF_FILEPATH>}
|
||||
```
|
||||
|
||||
The first command imports the first page of your pdf. The second command includes the 2nd to last page into your main
|
||||
file. You can also change the page-range of the second command, in case you don't want all pages to the last inculded.
|
||||
Reference in New Issue
Block a user