[Tex/LaTex] ny recommended package for converting A4 size PDF page into A3 size page

bookletpaper-sizepdfpagesprinting

Currently I'm able to generate required output file using pdflatex in A4 page size. To reduce printing cost, I'd like to convert this A4 size PDF into A3 page as mentioned in the diagram below. Is there any package which can help to generate an A3 page PDF?

[Note: There can be A4 size PDF file with 1,2,3,4,5 or 6 pages]

enter image description here

Kindly suggest.

Best Answer

You can do with the package pdfpages:

MWE

\documentclass{article}
\usepackage[landscape,a3paper]{geometry}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages={4,1,2,3},nup=2x2]{test.pdf}
\end{document}

Or even with the graphicx package if you want a custom layout:

MWE

\documentclass[twocolumn]{article}
\usepackage{graphicx}
\usepackage[landscape,a3paper]{geometry}
\geometry{verbose,tmargin=0cm,bmargin=0cm,lmargin=0cm,rmargin=0cm}
\parindent=0pt
\begin{document}
\centering
\includegraphics[page=4,width=.5\paperwidth,height=.49\paperheight,keepaspectratio]{test.pdf}
\includegraphics[page=2,width=.5\paperwidth,height=.49\paperheight,keepaspectratio]{test.pdf}
\newpage
\includegraphics[page=1,width=.5\paperwidth,height=.49\paperheight,keepaspectratio]{test.pdf}
\includegraphics[page=3,width=.5\paperwidth,height=.49\paperheight,keepaspectratio]{test.pdf}
\end{document}

The test.tex file used for obtain test.pdf:

\documentclass{article}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage[margin=1cm]{geometry}
\begin{document}
\resizebox{\linewidth}{!}{A4-1} \lipsum[1-8]\newpage
\resizebox{\linewidth}{!}{A4-2} \lipsum[1-8]\newpage
\resizebox{\linewidth}{!}{A4-3} \lipsum[1-8]\newpage
\resizebox{\linewidth}{!}{A4-4} \lipsum[1-8]\newpage
\end{document}