I needed to print today some copies of a PDF via CUPS (Common UNIX Printing System). The problem is that if I use the command line option -# (print a number of copies), the printer tends to print first all copies of the first page, then all copies of the second page and so forth. To avoid having to sort the papers after printing, I am combining them first into a single PDF using LaTeX:
\documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[left=0cm,right=0cm,top=0cm,bottom=0cm]{geometry} \usepackage{pdfpages} \usepackage{forloop} \begin{document} \newcounter{themenumber} \forloop{themenumber}{0}{\value{themenumber} < 60}{ \centering \includepdf{myDocument.pdf} } \end{document}
Note: \forloop{themenumber}{0}{\value{themenumber} < 60}{ might be not properly rendered above. Click on view source to get the right it right.
That command has the disadvantage, that much more data gets send to the printer, but at least it works.