You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
839 B
Markdown
32 lines
839 B
Markdown
---
|
|
categories:
|
|
- PDF
|
|
- Python
|
|
cover: zac.jpg
|
|
cover_alt: splitting shaping things, by bruce sterling
|
|
date: 16/11/2022
|
|
description: Split double-paged DPF
|
|
git: https://git.xpub.nl/kamo/pdf-zac
|
|
slug: pdf-zac
|
|
title: PDF ZAC
|
|
---
|
|
|
|
|
|
There is this book i want to print (see [Birds press](https://hub.xpub.nl/soupboat/~kamo/projects/birds-press/), but the pages are already coupled 2 by 2 and so the booklet printing doesn't work.
|
|
|
|
This script uses [pypdf2](https://pypdf2.readthedocs.io/en/latest/user/cropping-and-transforming.html) to crop and transform the a4 horizontal pages of the pdf into 2 a5 vertical ones.
|
|
|
|
Good way to procrastinate eh
|
|
|
|
## Usage
|
|
|
|
First install the requirements (actually just PyPDF2)
|
|
|
|
`pip install -r requirements.txt`
|
|
|
|
The script takes a `input.pdf` and gives out a `output.pdf`.
|
|
|
|
Then run the code.
|
|
|
|
`python3 zac.py`
|