Creating Booklets

1. Writing a Booklet
1.1. Properties of your created file
1.2. Using Mom
2. Creating the printable version
2.1. Compressing the pdf
2.2. Formatting as a book
3. Printing
4. See also

tropf

ABSTRACT

short guide to create A5 booklets with a regular (duplex) printer

1. Writing a Booklet

You can safely skip this section if you don’t care and just want a booklet version of an already created document. The point of this is to create a PDF suited for an A5 booklet, as most documents you find in the wild are not.

1.1. Properties of your created file

For a nice booklet you want your file to have the following properties:

Use some form of typesetting software for this. I usually use groff with mom (see next section), Latex should also work. If you don’t like yourself you could also use Libre Office Writer or MS Word.

1.2. Using Mom

If you want to use groff to write booklets (or even whole books), I can recommend mom. Using the mom doc I regularly use this preset:

.PAPER A5
.
.TITLE "title"
.SUBTITLE "subtitle"
.AUTHOR "author"
.MISC "Org 1" "Org 2"
.COPYRIGHT "CC BY 4.0"
.AUTO_RELOCATE_TOC
.
.DOCTYPE DEFAULT
.PRINTSTYLE TYPESET
.ATTRIBUTE_STRING ""
.FINIS_STRING ""
.FINIS_NO_DASHES
.TOC_HEADER_STRING "Table Of Contents"
.CHAPTER_STRING "Part"
.COVER TITLE AUTHOR COPYRIGHT COVERTEXT MISC PDF_OUTLINE_LABEL "Cover: "
.PAGENUM_POS BOTTOM RIGHT
.PAGENUM_HYPHENS NO
.RECTO_VERSO
.FORCE_RECTO
.
.FAMILY A
.FT R
.PT_SIZE 10
.\"SMARTQUOTES DE
.START
.
.PP
Preface text here
.
.EL
.COLLATE
.DOCTYPE CHAPTER
.CHAPTER 1
.CHAPTER_TITLE "Getting Started"
.PREFIX_CHAPTER_NUMBER
.START
.
.HEADING 1 "Setup"
.PP Chapter content
.
.FINIS
.nr WAS_EVEN 0
.nr WAS_ODD 0
.if e .nr WAS_EVEN 1
.if o .nr WAS_ODD 1
.TOC_PAGE_SETTINGS
\!.if o .PAGENUM_POS BOTTOM LEFT
.TOC_PAGE_SETTINGS END
.TOC
.HEADERS NO
.if e .if \n[WAS_EVEN] .bp
.if o .if \n[WAS_ODD] .bp
.PAGINATE NO
.FOOTERS NO

To build a PDF file from that pipe it through

preconv -eutf8 | pdfmom -Tpdf -c -R -p -t -mden -mom -m www

2. Creating the printable version

2.1. Compressing the pdf

When printing the booklet, you will send the entire PDF file to the printer. It makes sense to make the sent data as small as possible. To do that, we’ll reencode the PDF file using ghostscript—hoping that the ghostscript encoder is smarter (and more compatible) than the previous pdf encoder.

Execute on the terminal (this might take a short while):

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -DBATCH -sOutputFile=doc-reencoded.pdf doc.pdf

2.2. Formatting as a book

Now format the file as a book. By default the pages will be rearranged (margins added, resized etc.) such that the result is printable. But a good typesetting software has already done that for you, so if used a typesetting software to create an A5 PDF add -n.

pdfbook2 -p a4paper -n doc-reencoded.pdf

This will create a file named doc-reencoded-book.pdf. The output file name can’t be changed.

3. Printing

Print the resulting document doc-reencoded-book.pdf using a double-sided printer, turning the page on the long edge. When using a non-double-sided printer you are on your own. Good luck!

Afterwards take the stack of paper out of the printer, just add staples (no reordering of pages etc.) and fold it.

4. See also


03 January 2021
Home