11

I would like to include pages from two different PDF files on a single page, side by side (possibly using nup=2x2). Presently, there is a page ejected before each \includepdf.

11

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> syntax.
  • <file-page-list> -- <filename>[,<page spec>][,<file-page-list>]
    A comma separated list of filenames and optional <page spec> specifiers. A <page spec> can be everything the option pages accepts. Leading and trailing spaces of items in the list is stripped.

So if you want to have pages X till Y from A.pdf and pages Z till V from B.pdf in a 2x2 grid use:

\includepdfmerge[nup=2x2]{A,X-Y,B,Z-V}

e.g.:

\includepdfmerge[nup=2x2]{A,1-2,B,1-2}

Will first use pages 1 and 2 of A.pdf and then pages 1 and 2 from B.pdf in a 2x2 grid.


Guessing from your example code in your comment I guess you need the following:

\includepdf[nup=2x2,frame,landscape]{%
  c:/Victor/Research/Presentations/Beamer-Presentations/Dam-Nonlinear.pdf,34-40,%
  c:/Victor/Research/Pdf-Library/Saouma/ASCE-Cyclic-Joint-Model.pdf,1,%
  c:/Victor/Research/Pdf-Library/Saouma/ASCE-Cyclic-Joint-Test.pdf,1%
}

(I broke it over several lines for readability, which is not required in your document.)

  • @victor: Glad I could help you. Note that you can accept the answer which helped you most by clicking on the check-mark at the top left of the answer, just below of the voting arrows. Don't forget to up-vote all good answers, too. – Martin Scharrer Apr 18 '12 at 16:58
2

When using \includegraphics, you can specify page=<n> and only include that specific page of the multi-page document. So, for example, you could use

\noindent%
\includegraphics[page=20,width=.5\textwidth]{file1}%
\includegraphics[page= 5,width=.5\textwidth]{file2}%

to include page 20 of file1.pdf and page 5 of file2.pdf side-by-side.

  • No this does not work either, I get each page of my pdf on a separate output page \section{Fracture} \includepdf[pages={34-40},nup=2x2,frame,frame,landscape]{c:/Victor/Research/Presentations/Beamer-Presentations/Dam-Nonlinear.pdf} \noindent \includepdf[pages={1},width=0.4\linewidth,frame]{c:/Victor/Research/Pdf-Library/Saouma/ASCE-Cyclic-Joint-Model.pdf} \includepdf[pages={1},width=0.4\linewidth,frame]{c:/Victor/Research/Pdf-Library/Saouma/ASCE-Cyclic-Joint-Test.pdf} – victor Apr 18 '12 at 16:40
  • That is the way to go if you only have two pages you want to include side-by-side, but it seems the OP wants to have several more pages from different PDFs in a 2x2 matrix. – Martin Scharrer Apr 18 '12 at 16:50
  • @victor: Note that I'm using \includegraphics and not \includepdf. Mine (the former) would work for a page-by-page inclusion. Anything bigger and Martin's answer is better-suited. – Werner Apr 18 '12 at 16:53
  • Werner, @victor: Just to point it out: \includepdf (and \includepdfmerge) uses \includegraphics internally and will pass all other options along to it. – Martin Scharrer Apr 18 '12 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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