A small terminal tool for manipulating pdf files.
The history of this small Python script is quite straight-forward. I do a lot of my work on Ubuntu and need to slice and re-arrange scans from time to time. While there are some larger editors for processing pdf files on Ubuntu, all of them seemed too bloated for my simple use case. I came across the pdfrw package for Python which seemed easy enough to use. I decided to write a terminal application that allows me to quickly process some pdfs.
What can it actually do?
Currently the tool offers the following functions:
- Appending 2+ files
- Merging 2+ files, by appending all their first pages, then the second ones and so on. Useful if you need two scans of a two-sided document...
- Inserting one document into another
- Slicing a file, keeping only ranges, or particular pages from it
- Reversing a file
In order to avoid long sequences of transformations, like slicing the relevant pages out of a file before appending it, the tool supports slicing arguments for the files passed to it. This slicing operator is inspired by Python's slicing syntax, though adjusted to work well with page numbers.
If you are interested in trying out the tool for yourself, check it out over at GitHub.ARoefer/pdf_tool