A Swiss Army Knife sort of python scripts collection to manipulate PDFs. It relies on:
- pdfjam
- pdftk
- pdfunite (poppler)
- ghostscript
- mupdf-tools
The project is available on pypi: https://pypi.org/project/PDFknife/
pip install PDFknife
pdfknife-A5-- Arrange two A5 pages side by side on A4 paperpdfknife-clean-- Recompress and clean a PDF with Ghostscriptpdfknife-cut-- Cut margin marks and toolbox artefacts off a PDFpdfknife-even-- Extract only even pages from a PDFpdfknife-extract-- Extract embedded images and fonts from a PDFpdfknife-margin-- Add a white margin around PDF pagespdfknife-merge-- Merge several PDF files into onepdfknife-recto-- Arrange two A5 recto pages side by side on A4 (top-to-bottom)pdfknife-reverse-- Reverse page order of a PDFpdfknife-rotate-- Rotate all pages of a PDF by a given anglepdfknife-shrink-- Compress/reduce file size of PDFs with Ghostscriptpdfknife-split-- Split a multi-page PDF into separate single-page PDFspdfknife-tearpages-- Remove the first and/or last page of a PDFpdfknife-trim-- Trim (crop) edges of PDF pages
BSD3, See LICENSE file.