Skip to content

concatenate cropped halves of 2 single page PDFs into 1 PDF

License

Notifications You must be signed in to change notification settings

atloo1/pdf-halves-merger

Repository files navigation

pdf-halves-merger

GitHub Actions Workflow Status Dynamic TOML Badge Dynamic TOML Badge GitHub License GitHub code size in bytes

Checked with mypy Poetry pre-commit Renovate enabled Ruff

concatenate cropped halves of 2 single page PDFs into 1 PDF:

┌─────────┐       ┌─────────┐       ┌─────────┐
│         │       │         │       │         │
│         │       │         │       │         │
│ A     B │   +   │ C     D │   →   │ A     D │
│         │       │         │       │         │
│         │       │         │       │         │
└─────────┘       └─────────┘       └─────────┘

OR

┌─────────┐       ┌─────────┐       ┌─────────┐
│    A    │       │    C    │       │    A    │
│         │       │         │       │         │
│         │   +   │         │   →   │         │
│         │       │         │       │         │
│    B    │       │    D    │       │    D    │
└─────────┘       └─────────┘       └─────────┘

motivated by wanting 2 4x6 inch shipping labels on 1 8.5x11 inch print

prerequisites

git clone https://github.com/atloo1/pdf-halves-merger.git
cd pdf-halves-merger/

run

poetry install --without dev
poetry run python -m pdf_halves_merger.main --help

develop

prerequisites

1st time setup

pyenv install 3.9 --skip-existing   # or your choice
pyenv local 3.9   # or your choice
poetry install
poetry run pre-commit install

About

concatenate cropped halves of 2 single page PDFs into 1 PDF

Resources

License

Stars

Watchers

Forks

Languages