4

I want to assemble some application documents into a single pdf-file using TeX. Each single document file originally was in DinA4. I scanned them and have them as pictures now. To assemble all individual files so that they fill the whole page I found this nice package written by Jochen. After having saved this package as fullpagegraphic.sty I do the following:

\documentclass[a4paper]{scrreprt}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{fullpagegraphic}
\begin{document}
\includegraphicsfullpage{document1}
\includegraphicsfullpage{document2}
\end{document}

I end up with two problems:

  1. The first page is always blank.
  2. On the second page, there is the number 2 in the lower left area. This appears only on the second page and not on the first or third etc.

Does any know how to get rid of the blank page and the number 2 on the second page? Changing the document class does not help.

  • 4
    Why don't you use the package pdfpages? (Despite the name it works with other graphics formats too) – Ulrike Fischer Dec 17 '13 at 15:02
  • Pdfpages works nicely. However, I just noticed that I do not only have DinA4 but also some documents in an american paper format (216mm x 279mm). These will also be included using pdfpages but result in some white space on the page. Here it comes down to a matter of taste whether one bothers about this or not. The solution below does not create white space. However, it slightly distorts the pictures (and the fonts in there) to avoid this. Both solutions are fine, thank you. – Tako Dec 18 '13 at 12:17
  • 1
    pdfpages can create pages with different size. Use the fitpaper option. pdfpages can also scale inputs to the page size. See the documentation. – Ulrike Fischer Dec 18 '13 at 12:55
5

Changing the pagination parameters is not the best thing to do. Here's a working version:

\documentclass[a4paper]{scrreprt}
\usepackage{graphicx,picture}

\newcommand{\includegraphicsfullpage}[1]{%
  \newpage
  \bgroup
  \thispagestyle{empty}%
  \parindent=0pt
  \begin{picture}(0,0)
  \put(%
    \dimexpr-\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi-1in,%
    \dimexpr\topmargin+\headheight+\headsep+1in+\topskip-\paperheight
  ){%
    \includegraphics[width=\paperwidth,height=\paperheight]{#1}%
   }
  \end{picture}%
  \newpage
  \egroup}

\begin{document}
\includegraphicsfullpage{example-image-a}
\includegraphicsfullpage{example-image-b}
\end{document}

The placement point of the picture environment is computed to be the lower left corner of the page.

enter image description here

|improve this answer|||||

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.