Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a PDF file with multiple figures; each figure is a separate page in the PDF file.

I am using pdflatex, and I would like to use \includegraphics or equivalent to include some of the figures.

Of course I could use an external tool to split the PDF file into multiple one-page PDF files. Then I could use \includegraphics as usual. However, I would have a much simpler workflow if I could avoid this extra step. Hence the question:

How can I include, e.g., page 3 of foo.pdf as a figure?

I am aware that there is a Latex package called pdfpages, but it seems to be designed for something else: with pdfpages, each page in the input file will produce a full page in the final document, not just a box.

share|improve this question

1 Answer 1

up vote 67 down vote accepted

graphicx knows the page option:

\includegraphics[page=3]{foo}

should work, or

\includegraphics[page=..,trim=...,clip]{foo}

for only parts of the page.

share|improve this answer
6  
Many thanks, it indeed works! I was already writing that I would like to do something like \includegraphics[page=3]{foo}, but didn't try it, as I couldn't find anything like that in the documentation of the graphicx package... Thus a follow-up question that might help me and others in the future: where is the page= option documented? –  Jukka Suomela Dec 29 '10 at 19:35
3  
that is defined only for the driver pdftex, the reason why you find it not in graphicx, but in the file pdftex.def –  Herbert Dec 29 '10 at 19:53
4  
But that effectively means that it's not documented at all, since pdftex.def certainly isn't where anyone should look for such information, and other that a single mention that the graphicx package has "automatic pdfTeX support", the pdftex documentation isn't really helpful either. (I've been using graphicx for years and didn't know about this either.) –  Alan Munn Dec 29 '10 at 21:17
3  
Anyone knows how to put not a entire page, but just a piece. I mean, just 60% of one page in a pdf file. –  João Mar 7 '13 at 19:51
3  
@João: use \includegraphics[page=..,trim=...,clip]{file.pdf} –  Herbert Mar 8 '13 at 8:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.