Score:9

How to make a brochure from a pdf file in ubuntu?

cn flag
Sam

Say that I have a 16-page pdf file, A4 sized. I have A4 paper and printer. I want to shrink it to halves, and print them on 4 sheets of paper, double side, fold them in halves, and staple it in the middle.
The way I do it now is to export it to PNG, use LibreOffice Writer to rearrange them. This is time-consuming. Is there a better way to do it? If I have a 64 page file.
PS: What if this is a dictionary and I shall Coptic bind it? https://www.wikihow.com/Coptic-Bind-a-Book How to create folios? My (theoretically,not implemented) solution is to write a Python Script.

Piotr Gogolin avatar
in flag
That DTP process you are talking about is called `imposition`. You can find few solution here: [Gluing (Imposition) PDF documents](https://stackoverflow.com/questions/465271/gluing-imposition-pdf-documents) or here: [PDF::Impose](https://github.com/jamis/impose)
FedKad avatar
cn flag
Did you try boomaga virtual printer software? https://www.boomaga.org/ (Available in Ubuntu Software Center.)
Sam avatar
cn flag
Sam
It seemed that the SO question is rather old... Maybe the need arose then.
Sam avatar
cn flag
Sam
Unfortunately I am in a region with limited internet access, and snap store is out of reach.
Score:9
de flag

TL;DR: the tool for this is called pdfbook

You don't need to write anything. The tool already exists, and does what you want (four-page signatures of 2-up duplex-printed pages) by default. Indeed, if you had a 64-page PDF, by default pdfbook will arrange the pages such that you will use 16 sheets of paper, and print four separate signatures ready for binding precisely as you describe.

pdfbook is provided by texlive-extra-utils:

sudo apt install -y texlive-extra-utils
pdfbook MY-FANCY-MANUSCRIPT.PDF

Outputs a file arranged as you describe called MY-FANCY-MANUSCRIPT-book.PDF suitable for immediate printing however you may like.

Sam avatar
cn flag
Sam
It seems simple, but I haven't used TEX before, and 269MB just seemed too much for my old and outdated SSD.
Sam avatar
cn flag
Sam
Thanks anyway, Maybe next time I retire my laptop.
in flag
it works, thanks. In default mode, I had to flip it twice to print in a single side printing printer.
Score:5
in flag

There's a handy tool you can download from Ubuntu Software Center to make booklets called PDF Mix Tool.

PDF Mix Tool in Ubuntu Software Center

BeastOfCaerbannog avatar
ca flag
It should be noted that this is a snap app and it can also be installed by running `sudo snap install pdfmixtool` in a terminal.
Score:5
br flag

The printing system by itself has brochure-capability:

A pdftopdf Bonus

Very simply - try this:

/usr/sbin/cupsfilter -p test.ppd -m application/vnd.cups-pdf -o 'fit-to-page booklet' mixed.pdf > out.pdf

test.ppd may be replaced by your printer's PPD from /etc/cups/ppd. You will need to use sudo to get a copy of the PPD.

cupsfilter processes any input file, using printing system filters, to produce, as instructed by the -m option, out.pdf. Actually, the -p option can be omitted. One of the processing options (-o) is booklet, which produces a PDF in booklet format.

It took me less than 30 seconds to convert a 30-pages document to booklet format using the following command:

/usr/sbin/cupsfilter -m application/vnd.cups-pdf -o 'fit-to-page booklet' any.pdf > out.pdf
BeastOfCaerbannog avatar
ca flag
Just a small note: `/usr/sbin/` can be omitted and you can use `cupsfilter` without the full path to it, as `/usr/sbin` should already be in the `PATH` in a default Ubuntu installation.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.