A command line utility for easily modifying PDF files
Project description
Simple command line PDF editor
pdfriend
is a simple command line program for editing PDF files at the page level. It can, among other things:
- merge many PDFs, PNGs and JPGs into a single PDF
- split a PDF into different parts
- exctract images from PDFs
- select pages from a PDF
- rotate PDF pages
- delete PDF pages
- change the order of pages in a PDF
- encrypt and decrypt PDFs
- see and edit PDF metadata
Installation
The recommended way to install pdfriend
is through pipx. Simply run:
pipx install pdfriend
You need a working python 3.11 or newer installation.
Alternatively, you can install it as you would any other PyPI package, for example using pip:
pip install pdfriend
Usage
To access instructions for the usage of pdfriend
:
pdfriend help
As a quick overview:
Merging PDFs and images
PDFs:
pdfriend merge doc0.pdf doc1.pdf -o output.pdf
Images:
pdfriend merge img0.png img1.jpg img2.png img3.png -o output.pdf
PDFs and images:
pdfriend merge doc0.pdf img0.png doc32.pdf -o comb.pdf
Glob patterns are also supported:
pdfriend merge input_dir/*.png -o output.pdf
Editing PDFs
To edit a PDF file in place, enter the edit shell:
pdfriend edit doc.pdf
You can then use the edit subcommands, for example
rotate 12 90
To rotate page 12 by 90 degrees, or
delete 6
To delete page 6, or
swap 3 7
To swap pages 3 and 7, or
undo
To undo the previous command, etc. Use
pdfriend encrypt sus.pdf -o sus-encrypted.pdf
to encrypt the PDF with a password. Use
pdfriend invert wrong.pdf -o right.pdf
to invert the order of the pages in a PDF. Use
help
To see all the available subcommands
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pdfriend-0.7.2.tar.gz
.
File metadata
- Download URL: pdfriend-0.7.2.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fb6ad84b16198d618cfaa113a97181a1d4c8a230a74bd45782e5eda6fe0bd55 |
|
MD5 | 8415bd8047458f0aaece615468013b74 |
|
BLAKE2b-256 | 17b8aeb4adb56c5431ce005ac98772d951954cad239f599882dc9b905075df16 |
File details
Details for the file pdfriend-0.7.2-py3-none-any.whl
.
File metadata
- Download URL: pdfriend-0.7.2-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73f46dffc4c8cfe4cfca132178c8f2e0d6fd963c0f44e3a56aeac36d08748c0b |
|
MD5 | 5d5d2cf6d541812968e3397735328ed3 |
|
BLAKE2b-256 | de3a4baca2718db6d8140a974890656e26f8d5dbe8b3285aaf83f1796527367c |