views:

67

answers:

2

I have several pdf files of some lecture slides. I want to do the following: print every pdf file to another pdf file in which there are 6 slides per page and then merge all the resulting files to one big file while making sure that every original file starts on an odd page number (Edit: obviously, it will be printed in duplex) (possibly adding blank pages when necessary). Is that possible?

Edit: For those interested, this is for printing a LOT of course material for an exam... And I need to do this for a lot of courses.

+1  A: 

For putting multiple slides on one page, pdfnup from the PDFjam package is your friend.

For inserting the blank pages, I'm not sure; maybe you can convince pdfjam to do this as well. But can't you just turn off duplexing in the print settings?

Thomas
I do want to print in duplex. but I want to send the document to print in one click, but then staple each part in its self.
Amir Rachum
Ah, I misunderstood. You could also keep the separate documents, and print them all from the command line using `lpr` or a similar program.
Thomas
@Thomas trouble is, my printer doesn't really print in duplex, I need to flip the pages over myself, and I want to just do that once.
Amir Rachum
+3  A: 

If it were me, I would use PDFjam or a similar tool to perform the 6-up on each of the source documents.

I would then use PyPDF to calculate the number of pages in each, add a blank page if necessary, and merge the rest of the pages. Something like:

blank_page = PDFFileReader('blank.pdf').pages[0]
dest = PDFFileWriter()
for source in sources:
    PDF = PDFFileReader(source)
    dest.addPage(PDF.pages)
    if PDF.numPages % 2: #odd number of pages in source
        dest.addPage(blank_page)

It appears PyPDF does also have support for merging pages with resize and relocate, so theoretically, it should also work for creating an n-up document, though I see no example code for that.

Jason R. Coombs