Tag Info

Hot answers tagged

66

graphicx knows the page option: \includegraphics[page=3]{foo} should work, or \includegraphics[page=..,trim=...,clip]{foo} for only parts of the page.


28

pdfpages provides the pagecommand option for \includepdf, which can be used to apply a page style for each page, to print headings and more. For example, add plain page style or your own page style to get page numbers on all included pages: \includepdf[pages=-,pagecommand=\thispagestyle{plain}]{filename}


22

run pdfcrop on the whole document, then every page is cropped and you can input it as usual with pdfpages. I always use the pdfcrop from Heiko Oberdiek which is already part of every TeX distribution. And, of course, Windows user need an installed Perl, eg http://www.activestate.com/perl


21

for a single page of a multipage .pdf: \documentclass{article} \usepackage{graphicx} \begin{document} \includegraphics[page=2,scale=0.75]{bplot.pdf} \end{document} or if you want all pages: \documentclass{article} \usepackage{pdfpages} \begin{document} \includepdf[pages={1-},scale=0.75]{bplot.pdf} \end{document}


20

\documentclass[a4paper]{article} \usepackage[1-10]{pagesel} \begin{document} % text \end{document} Thanks to Heiko Oberdiek. Remember, though, that references and table of contents will be incomplete. An alternative way is to compile the whole document and load its first ten pages in another one via pdfpages.


19

Loading the graphicx package in the preamble it is possible to import PDF images in the document: \documentclass{article} \usepackage{graphicx} \begin{document} \includegraphics[<options>]{filename.pdf} \end{document} Here <options> can be e.g. width=<width>, height=<height or page=<page number>. See the Graphics Guide for ...


19

Using your current settings, the pdfpages inserts the pages of an external PDF file as full page additions to your existing document. That is, the external file page setup is copied to the "main" output PDF on a page-by-page basis. The "main" file's page setup (including header/footer) is ignored. If you wish to include the same header/footer style of your ...


18

Use in the document with pdfpages \pdfinclusioncopyfonts=1. (The source of the problem is that two fonts of libertine now have the same internal fontname, and this leads to problems).


15

The beamer user guide (p.19) provides a solution: Commands like \includepdf only work outside frames as they produce pages “by themselves.” You may also wish to say \setbeamercolor{background canvas}{bg=} when you use such a command since the background (even a white background) will otherwise be printed over the image you try to ...


15

You could use the pagecommand option, such as \includepdf[pagecommand={\begin{tikzpicture}...\end{tikzpicture}}]{filename}


14

Have a look at the pdfpages package \documentclass{article} \usepackage{pdfpages} \begin{document} \includepdf[<options>]{<file>} Your Text \end{document} Edit Miguel suggested graphicx to include a graphic which is correct, the difference between graphicx and pdfpages is that graphicx puts the PDF as a graphic on a text page (maybe ...


14

The default pagecommand uses \thispagestyle{empty} which disables page numbers, headers and footers etc. You can use pagecommand={} to overwrite this and get normal layout for these pages.


13

As already said by others in the comments you need to use \includegraphics directly because \includepdf uses a page of its own. You can use a tabular to get the 2x2 layout and use the page=<number> key to select the page: \documentclass{article} \usepackage{graphicx} \usepackage{blindtext} \begin{document} \blindtext \begin{figure}[h] \centering ...


13

The inserted link is a hyper-link, not a LaTeX \label. Therefore the \hyperlink macro works but not the \pageref. I don't think you can get the page information from a hyper-link, so I think you need to add \labels manually. This can be done best using the pagecommand key and a custom counter: \documentclass{article} \usepackage{hyperref} ...


13

If the coordinates of the valuable parts in your PDF images is fixed, then the following method can be automated. Use the following template to trim or crop images and compile it with xelatex. You will get 2 pages, one for navigation and the other one is the cropped image. % cropping.tex \documentclass{article} \usepackage{pstricks} ...


13

You can crop/trim a pdf when including it using the trim=left botm right top. Full example: \begin{figure}[htbp] \centering \includegraphics[trim=0.5cm 11cm 0.5cm 11cm, width=1.00\textwidth]{gfx/BI-yourfile.pdf} \caption{Title} \label{fig:somthing} \end{figure} Note: Figuring out how far to trim can take time. To speed things up a ...


12

About the tilde: Apparently the ~ is taken in its usually meaning, not as literal ~. I get a Package pdfpages Error: Cannot find file `test\nobreakspace {}it' error for a test~it file. Taking the filename verbatim should help. This can be done by \Verbdef from the newverbs package: \usepackage{newverbs} % ... ...


12

You can use the pagecommand key to declare the desired page style for the included pages: \documentclass{book} \usepackage[a6paper]{geometry}% just for the example \usepackage{fancyhdr} \usepackage{pdfpages} \pagestyle{fancy} \fancyhf{} \fancyhead[C]{Some centered header} \fancyfoot[C]{\thepage} \begin{document} ...


11

You can also include the next command, for all pdfs that will be put into the document, \includepdfset{pagecommand=\thispagestyle{plain}} This command goes after \usepackage{pdfpages}.


11

pdfpages typically inserts page breaks before inserting content, causing problems if you want to have an arrangement if pages inside a figure environment. Instead, use the page key-value of \includegraphics itself to insert the contents on a page-by-page basis. Something like this: \begin{figure}[ht] \centering ...


10

I'd say take a look at memoir again. It's like an extended book class that includes functionality of many packages by default (fancyhdr & titlesec to name a few). If you are writing all the articles yourself (so they will all be in latex; it wasn't clear to me if you're authoring the whole document or compiling research...) then there is no reason to ...


10

Using fancyhdr you can define your own page style and move the page number/counter into the appropriate position. \usepackage{pdfpages}% http://ctan.org/pkg/pdfpages \usepackage{fancyhdr}% http://ctan.org/pkg/fancyhdr \fancypagestyle{mylandscape}{% \fancyhf{}% Clear header/footer \fancyfoot{% Footer \makebox[\textwidth][r]{% Right ...


10

It is very easy. Please use pdfpages.sty and click here for its manual. Sample Output Code Snippet Sample I used a pdf file downloaded from here and then renamed it as movies.pdf. \documentclass{article} \usepackage[a4paper,margin=1cm]{geometry} \usepackage{pdfpages} \begin{document} \includepdf[% landscape=true,% pages={1-16},%Include pages from 1 ...


10

By default pdfpages uses the options pagecommand={\thispagestyle{empty}}. if you want the pagestyle on the included pages you need to call includepdf like : \includepdf[scale=0.9,pages={-},pagecommand={\thispagestyle{fancy}}]{results.pdf}


10

Simply use \includepdfmerge instead of \includepdf. It inserts pages of several external PDF documents. It should allow nup=2x2 as part of its options. From the pdfpages manual, page 8: \includepdfmerge[<key=val>]{<file-page-list>} <key=val> -- A comma separated list of options using the <key>=<value> ...


9

Spaces at file names of PDF files at \includegraphics or \includepdf are allowed, if you are using package grffile: \usepackage{grffile} \usepakcage{pdfpages} % … \includepdf[pages=-]{test this.pdf} And for more verbatim interpretation of the file name you may use \detokenize: \usepackage{grffile} \usepakcage{pdfpages} % … ...


9

create a new document \documentclass[...]{article}% should have the same header as the original \usepackage{geometry} \geometry{...}% the same as in your text document \usepackage{pdfpages} \begin{document} \includepdf[pages=1-]{thetitle}% pdf document of the title \includepdf[pages=1-]{thetext}% the main text doc \end{document} and you'll get a new one ...


9

As mentioned by JLDiaz, you should use the nup option. According to the pdfpages documentation, the syntax of the option is: nup=(xnup)x(ynup), where (xnup) and (ynup) specify the number of logical pages in horizontal and vertical direction. You may also want to use the landscape option in order to switch to landscape orientation and avoid twisting the neck ...


8

The included pages have a different aspect ratio (more width, less height). Therefore it is not possible to have the same margins unless the pages are distorted. You can run the external PDF file through pdfcrop to get a PDF file without white margins. That makes the next steps/calculations easier. Since the included page should fit into the text body and ...


8

You either need to specify the full path e.g.: \includepdf[pages={1-7}]{/home/bob/Documents/MyFolder/Resources/myfile.pdf} or specify it relative to the current directory e.g. suppose your document is /home/jane/mydirectory/mydoc.tex and you need to include /home/jane/myotherdirectory/Resources/myfile.pdf then: ...



Only top voted, non community-wiki answers of a minimum length are eligible