# 2 pages on 1 with pgfpages

I'm sorry I know this question has been asked several times.

I would like to get a 2 pages on 1 using pgfpages as shown by the following:

\documentclass[french, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[landscape]{geometry}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper,border shrink = 5mm]


But I only get that :

instead of getting the two pages side by side.

What's wrong ?

\documentclass[french, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\usepackage[margin = 1.5cm]{geometry}
\usepackage{babel}
\usepackage{float}
\usepackage{graphicx}
\usepackage[official]{eurosym}
\usepackage{color}
\usepackage{colortbl}
\usepackage{xcolor}
\usepackage{pifont}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper, border shrink = 5mm, landscape]

%\usepackage{multicol}
%\usepackage{fancybox}
%\usepackage{amsthm}
%\usepackage{amsmath}
%\usepackage{tabvar}
%\usepackage{wrapfig}
%\usepackage[unicode=true,pdfusetitle,%
% bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,%
%{hyperref}
\usepackage{hyperref}
\begin{document}
\lipsum

\end{document}


You need to add landscape to the \pgfpagesuselayout command

\pgfpagesuselayout{2 on 1}[a4paper,border shrink = 5mm,landscape]


And remove the [landscape] option from your \usepackage{geometry}.

Here's a minimal document that shows the correct output:

\documentclass[french, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper,border shrink = 5mm,landscape]
\begin{document}
\lipsum
\end{document}


• Sorry Alan and thank you but I obtain the two pages side by side on an a4 portrait – imotep81 Feb 17 '18 at 15:30
• @imotep81 But then you need to add a compilable minimal document like the one I've added to my answer that shows exactly what you're doing. – Alan Munn Feb 17 '18 at 15:42
• In fact it's totally correct when I compile with the Texlive of my debian distribution. When I compile with TeXwriter on Android the result is not the one I hoped. Thanks – imotep81 Feb 17 '18 at 16:09
• Wrong....With your minimal document I get the same also with TeXwriter but with my initial document it doesn't work...Because I use this : \usepackage [unicode=true,pdfusetitle, bookmarks =true, bookmarksnumbered =false, bookmarksopen =false, breaklinks =false, pdfborder= {0 0 0},backref =false, colorlinks =true ] {hyperref } and when I remove it I get what I want – imotep81 Feb 17 '18 at 16:46
• @imotep81 Again, without you providing a minimal document that shows the problem, it's hard to diagnose. Adding hyperref to my example document doesn't change anything for me. – Alan Munn Feb 17 '18 at 16:49