I teach programming and one of the ways I use Latex is to take an entire class' worth of submitted programs and generate one large PDF document I can send to the printer. (With about a hundred students it's annoying to create and print 100 documents separately.) In the interest of saving trees, I'd like to print four pages per sheet of paper (two on front, two on back). This is a setting that is supported naturally by my printer.
The problem is that student's programs cannot end up on the same piece of paper. For example, if the first student's program ends up as three pages, and the second student's program ends up as three pages, then the first sheet of paper will have the first student's program in positions 1-3 and the first page of the second student's program in position 4. Then the second sheet of paper will have the next two pages of the second student's program in places 1 and 2, and the third student's program in places 3 and 4, etc.
What I would like is a LaTeX command that inserts between zero and three pages depending on the current absolute page. If the current absolute page is a multiple of four, then insert zero pages. If not, it inserts up to three pages so the next command will start on a multiple of four.
To use a LaTeX analogy, I'd like a version of \cleartooddpage that instead clears to a fourth page. This is actually what I currently use to get double sided printing, but as mentioned above I'd like to get four pages per paper.