[Tex/LaTex] Including a PDF page in latex with pdfpages without scaling

pdfpdfpagespdftexscaling

I am writing a document in LaTeX and I'm trying to include a frontpage in PDF (aptly called "Frontpage.pdf") the document, to be compiled with Pdflatex.

I tried to include it with the pdfpages package and the the command lines

\includepdf{Frontpage}

or, alternatively

\includepdf[noautoscale]{Frontpage}

Both of the above include the file in question, but scale its size, regardless of the options I've been setting.

I would simply like to include the file "as is", keeping its size intact.

Best Answer

There's a conflict between Sweave and pdfpages. Try this.

Note this is a .Rnw file (Sweave file) which is being processed into tex via a call like this from R: Sweave("foo.Rnw"). So, it's a specific Sweave issue. Anyhow, change your \usepackage call for Sweave in your .Rnw file to the following. Note the addition of [nogin]

%%%%%%%%%%%% foo.Rnw

\documentclass{article}
\usepackage[nogin]{Sweave}
\usepackage{pdfpages}

\begin{document}

\newpage

\includepdf[fitpaper=true, pages=-]{test.pdf}

\end{document} 

What's going on.. So By default, Sweave.sty sets the width of all included graphics to: \setkeys{Gin}{width=0.8\textwidth}, and it is treating the inserted pdf pages as graphics and setting the size according to the above. You need to override this. If you do this in the \usepackage call, you do this for all graphics. If you don't want that, then you can use this (or something similar)

\setkeys{Gin}{width=8.5in}  #um not positive on that syntax

\includepdf[fitpaper=true, pages=-]{test.pdf}

\setkeys{Gin}{width=0.8\textwidth}
Related Question