Unlocks editing permissions of PDFs that don't have a password
Project description
unlock_pdf
This is a command-line tool that wraps around pikepdf to provide a convenient way to remove editing restrictions on PDFs with a write restriction but without a password.
Project structure
See https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/
Also see https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/#running-a-command-line-interface-from-source-with-src-layout for how to call the unlock_pdf from cli
See https://hatch.pypa.io/1.9/config/metadata/#entry-points for how to define entry points for the
Installation
Installing with uv (Recommended)
uv automatically places the unlock_pdf command into PATH and puts it in a persistent environment such that it can be accessed everywhere from the terminal.
uv tool install unlock_pdf
Insatlling with PyPI
If you prefer to have it in one specific environment, you can install with pip as well.
pip install unlock_pdf
Examples
Examples below are demonstrated assuming a installation with uv. You may use the following To unlock 1 pdf:
$ unlock_pdf path/to/pdf
Directory flag
To unlock all pdf's within a directory you will need to call the -d flag.
$ unlock_pdf path/to/folder -d
Suffix flag
The default behavior is to add _unlocked at the end of the filename.
To change this, use the -s flag:
$ unlock_pdf path/to/pdf -d -s "_new"
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unlock_pdf-0.4.5.tar.gz.
File metadata
- Download URL: unlock_pdf-0.4.5.tar.gz
- Upload date:
- Size: 26.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
189d4f17546adea26747ae6e42f74586c821132fce81d77f1099b0bc3f67dc96
|
|
| MD5 |
e454dc355d349c8cf77bff92f418add0
|
|
| BLAKE2b-256 |
b428cc26b1043d907fb4d087913842241233dd58cfd7064d842c5579fe123e12
|
File details
Details for the file unlock_pdf-0.4.5-py3-none-any.whl.
File metadata
- Download URL: unlock_pdf-0.4.5-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
949d264b011bbdd4c6850a5086fb1c233ddf1c1f8e65491dab4dae3f5983358a
|
|
| MD5 |
ae0fd23fa2e1ed5326bcfee97cdd93a4
|
|
| BLAKE2b-256 |
e648fe55b21b27410d1f01a2843f02def2f6bf23af4eda60d70ecd9bb46b1797
|