pdfkit is a simple toolkit for processing PDF files. It currently works with PDF <= v1.4 or any version that doesn't use cross-reference streams. This is very POC so expect bugs.
This project uses stack. To build, simply run:
stack build
See help command:
pdfkit help
Usage:
pdfkit <options> [<flags>]
Options:
merge - Merge two or more pdf files.
split - Split a pdf file into multiple pdf files.
extract - Extract specific page(s) from a pdf file.
remove - Remove pages.
rotate <angle> - Rotate pages.
scale <factor> - Scale pages by number 'factor'.
crop <rect> - Crop pages.
help - Show this help information.
Flags:
-files <filename+> - Input files.
-verbose - Display verbose information.
-out <filename> - Output filename.
-pages <page-options+> - Pages to process.
[meta]:
page-options - 1 2 3 (page) | 1-4 5-6 (page-range) | even | odd | all
rect - 1 2 3 4 (num num num num)
factor - 0.5 (num)
angle - 0 | 90 | 180 | 270 (num)
BSD-3-Clause