Skip to content

Instantly share code, notes, and snippets.

@kintaro1981
kintaro1981 / cutpdfpages.py
Last active June 10, 2023 14:26
This script splits each pdf page in half vertically and merge them in a single PDF in order. It asks how many pages do you want to skip to avoid splitting a book cover or a specific number of initial pages.
# -*- coding: utf-8 -*-
"""
This script splits each pdf page in half vertically and merge them in a single PDF in order.
It asks how many pages do you want to skip to avoid splitting a book cover or a specific number of initial pages.
Usage:
python cutpdfpages.py <filename.pdf> <newfilename.pdf>
Inspired by: https://github.com/anadeangelo/pdf_crop