Prepares PDFs to be home-printed as booklets
Go to file
Andrew S. Rightenburg 4d34c3c2cd
Updated changelog
2024-05-01 22:02:40 +08:00
classes Liesel can now compile on OpenBSD 2023-02-14 01:14:30 -05:00
debian Updated changelog 2024-05-01 22:02:40 +08:00
functions Patched a bug which blocked PDFs over 2GB on 32bit systems 2023-04-02 14:19:00 -04:00
LICENSE Update LICENSE 2021-08-17 18:37:05 +00:00
README.md Updated readme 2023-08-14 02:42:40 -04:00
includes.h Patched a bug which blocked PDFs over 2GB on 32bit systems 2023-04-02 14:19:00 -04:00
liesel.gif Added Liesel "demonstration" gif for readme 2023-02-15 08:02:16 +00:00
main.cpp Updated patch number in main.cpp for -V and -h 2023-04-02 14:24:13 -04:00
makefile Added make clean target and updated patch number 2023-04-02 14:21:56 -04:00

README.md

liesel

Liesel turns ordinary PDFs into pamphlets/booklets which can be printed at home.

Rudy said, "You know something, Liesel, I was thinking. Youre not a thief at all. Stealing is what the army does. Taking your father, and mine." He kicked a stone and it clanged against a gate. He walked faster. "All those rich Nazis up there, on Grande Strasse, Gelb Strasse, Heide Strasse. How does it feel anyway?"

"How does what feel?"

"When you take one of those books?"

At that moment, she chose to keep still. If he wanted an answer, he'd have to come back, and he did.

"Well?" he asked, but again, it was Rudy who answered, before Liesel could even open her mouth.

"It feels good, doesn't it? To steal something back."

Markus Zusak's "The Book Thief"

Installation

On Debian GNU/Linux, Liesel can be easily installed via the deb.rail5.org repository:

sudo curl -s -o /etc/apt/trusted.gpg.d/rail5.gpg "https://deb.rail5.org/rail5.gpg"
sudo curl -s -o /etc/apt/sources.list.d/rail5.list "https://deb.rail5.org/debian/rail5.list"
sudo apt update
sudo apt install liesel

About

This is free software (GNU GPL 3), and you are welcome to redistribute it under certain conditions.

Demonstration

Note: Liesel is a command-line program. For a GUI front-end, see BookThief

Liesel will take any ordinary PDF (for example, an e-book) and combine/arrange the pages so that when the output PDF is printed, the entire stack of papers can just be folded in half to produce a booklet.

Like this

Features

All listed features are optional. A simple command like liesel -i somebook.pdf -o booklet.pdf will of course work just fine

Liesel also comes with a manual page to help guide you through some more advanced options. You can view it, after installing Liesel, by running man liesel in your terminal

Here are just a few available options:

  • Range input (i.e, process only the specified pages) (Example: -r 1-5,7-10,3,20,100-90)

  • Segmented output (produce multiple PDFs in segments of any given length (e.g, 40 pages per segment), to be more manageable when printed) (Example: -s 40)

  • Convert to grayscale (-g)

  • Automatic "duplex" flipping (-l)

  • Specify PPI / quality (Example: -d 175)

  • Rescale output PDF to print on any arbitrary paper size (Example: -t 8.5x11)

  • Crop PDF pages (Example: -C percentage-to-crop-from-the-left,right,top,bottom, ie -C 10,20,30,40)

  • Convert to pure black-and-white (Not grayscale) (Example: -k 50 changes every pixel under 50% brightness to black, every pixel over 50% to white)

  • Widen center margins (add blank space between left and right-hand sides) (Example: -w 20)

  • Divide each page into two pages (for example, if the PDF is a scanned book with left and right-hand pages not separated) (-D)

The manpage and liesel -h will provide a comprehensive list of all options and how to use them

Build Requirements

  • Magick++ API (Debian Packages: graphicsmagick-libmagick-dev-compat & libmagick++-6-headers)

  • libfontconfig1 (Debian Package: libfontconfig1-dev)

  • Poppler (Debian Package: libpoppler-cpp-dev)

Building

make
sudo make install

Supported Systems

Liesel is currently tested & verified to successfully build & run on:

  • GNU/Linux
  • MacOS
  • OpenBSD
  • Windows

If using OpenBSD, 'gmake' (GNU make) must be used rather than the default 'make'. Run 'gmake openbsd'

Windows binaries must be cross-compiled from GNU/Linux. Binaries for all other systems can be compiled from those systems themselves. See autobuild for a script to automate the build process for GNU/Linux and Windows binaries