# One PDF for Doublepage

I have a single PDF document that I want to include into my script. It is supposed to be used as a double page, like you open the book and the left page is the left half of the PDF document and right is right.

Is this possible or should I try to separate the PDF into two parts and just use \includepdf ? I read the pdfpages docs and used several options, yet without success.

Edit: The PDF I want to include only has 1 page but is supposed to be two pages in the final document.

• a range of pages of course, yes, but I want to extend a single page PDF document over 2 pages. – Donvini May 12 '18 at 12:08
• The paper size is not the problem, its 2 A4 pages wide, but when I include it, it gets turned 90 degrees instead of spreading over 2 pages. I set landscape to false and it didn't change. – Donvini May 12 '18 at 12:12
• sorry I misread the question (I deleted the first comment:-) – David Carlisle May 12 '18 at 12:51

There is a bit of confusion over dimensions when scaling and clipping at the same time, so I did it in two stages. I scaled using \includegraphics into a savebox, then clipped the savebox using \adjustbox.

The file is what I got when I copied the above image.

\documentclass{article}
\begin{document}
\sbox0{\includegraphics[height=\textheight]{images/ON4re}}% scale impage

\end{document}


• Great, I wouldn't have come up with this solution on my own, thank you a lot! it's really elegant. – Donvini May 12 '18 at 13:56

Here is a way to put the picture in the background, covering the whole page.

\BackgroundHalfPicture takes l or r as first parameter to select the left or right half, and the second is the picture.

The line \mbox{} is necessary, because \newpage doesn't generate empty pages. You could instead write something on the page, you just need to move it to the door.

The result:

The code:

\documentclass[a4paper]{article}
\usepackage{eso-pic}

\makeatletter
\newcommand{\BackgroundHalfPicture}[2]{%
\sbox0{\includegraphics[height=\paperheight]{#2}}%
\AtPageLowerLeft{\makebox(\LenToUnit{\paperwidth},\LenToUnit{\paperheight}){%
\def\@tempa{#1}\def\@tempb{l}%
\ifx\@tempa\@tempb
\else
\fi
}}%
}%
}
\makeatother

\begin{document}
\thispagestyle{empty}
\BackgroundHalfPicture{l}{ON4re}
\mbox{}

\newpage
\thispagestyle{empty}
\BackgroundHalfPicture{r}{ON4re}
\mbox{}
\end{document}