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 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.

share|improve this question
1  
There is no noscaling option AFAIK, try the noautoscale option instead. –  Martin Scharrer May 29 '11 at 18:50
    
There must be something else that is going on. Can you make a minimal document that shows the problem? (e.g. make a test full-size pdf, and then insert it into a document with very small margins (using geometry). –  Alan Munn May 29 '11 at 18:51
    
It appears that the problems I've been experiencing stem form a conflict between the Graphicx, Sweave and Pdfpages packages, because changing the order of the \usepackage{} in the preamble changes the results. I'll keep you posted... –  MatteoS May 29 '11 at 19:11
    
pdfpages uses the graphicx package, so this order is anyway set. This leaves sweave. Please consider adding a minimal working example (MWE) that causes this problem so that other people can have a look on it. –  Martin Scharrer May 31 '11 at 12:03
add comment

2 Answers

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}
share|improve this answer
add comment

This solution is not using pdfpages but tikz, but works for me:

\documentclass[a4paper]{scrartcl}

\usepackage{tikz}

\begin{document}
  \begin{tikzpicture}[remember picture,overlay]
    \node[inner sep=0pt] at (current page.center) {\includegraphics[page=1]{Frontpage}};
  \end{tikzpicture}
  \clearpage
  \section{This is where it begins}
    Hello, world.
\end{document}

tikz will use the included pdf page as an overlay, the whole picture is not using any of the titlepage's space. That's why you need to clear the page before any text can come. You can also place more stuff on the titlepage, if you want, where you want.

share|improve this answer
    
IMHO there is no need for this. \includepdf[noautoscale]{Frontpage} should and normally does work. The issues seems to be some interaction with sweave as pointed out by the OP in the above comments. Could you test your solution with sweave to see if it shows the same issue? (No idea though how to use sweave). –  Martin Scharrer May 31 '11 at 12:05
    
@MatteoS, I outsource to you the experiment that Martin outsourced to me because I don't have or know sweave. –  Christoph May 31 '11 at 13:27
add comment

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.