jenom / pdfbook2

Create booklets from PDF files
GNU General Public License v3.0
56 stars 11 forks source link

Booklet A6 size #5

Open ppasedach opened 3 years ago

ppasedach commented 3 years ago

Is there an easy way to use pdfbook2 to create a booklet of A6 size, printing on A4 paper to be cut in the middle to get A5 paper which is then folded to A6 format?

rishta commented 3 years ago

It doesn't look like pdfbook2 could do it, but see here.

confluence commented 1 year ago

This is a very belated comment, but for the benefit of future readers who need to do this (like me in a few months' time) you can achieve this by running pdfbook2 again on the output. I used to do this with the old pdfbook, but I can't find a pdfbook2 option for specifying that the input file is landscape (and the output file needs to be portrait), so in between you also have to rotate the pages by 90% (to get back to a starting portrait document), which you can do with pdftk.

I just tested this and confirmed that the pages are in the right order. pdfbook2 crops pages to content automatically (which was a surprise), so make sure you disable that option.

ppasedach commented 1 year ago

Great! This works. I'm not sure what you mean by "pdfbook2 crops pages to content automatically," probably that it reduces the sizes of the margins by automatically scaling the the content?

pdftk sample-book.pdf cat 1-endeast output sample-rotated-clockwise.pdf is an intermediate pdftk run which re-oriented the output to portrait format again.

Next time I really need this I may write up a small shell script wrapper around the three commands.

confluence commented 1 year ago

It scales and crops the content to a degree I was not expecting -- it removed most of the whitespace from pages which were mostly blank.

I'm not sure if I will end up using this or write a custom wrapper to pdfjam (using the original pdfbook wrapper which is no longer maintained), but it's good to know that it's an option.