redact a phrase off a pdf file
Project description
redact-pdf
Redact a phrase off a pdf file
- Github repository: https://github.com/levyvix/redact-pdf/
- Documentation https://levyvix.github.io/redact-pdf/
Installation
pip install redact-pdf
Usage
Use the project in a python file
from redact_pdf.redact import TextRedactor
from pathlib import Path
pdf_file = Path(__file__).parent / "pdf_test.pdf"
save_path = Path(__file__).parent / "pdf_test_redacted.pdf"
tr = TextRedactor()
tr.redact_text(
file_path=pdf_file,
text_to_redact="XXX",
output_file_name=save_path,
)
This will result in a .pdf file called pdf_test_redacted.pdf with the phrase XXX removed from every page.
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
redact_pdf-0.0.3.tar.gz
(3.9 kB
view details)
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 redact_pdf-0.0.3.tar.gz.
File metadata
- Download URL: redact_pdf-0.0.3.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.10 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9d564db9695d8d6e979c9f0c15146c2a8cc24b0d721d246224820f4597df116
|
|
| MD5 |
858e84e77e184437ee7e1b5a8f044431
|
|
| BLAKE2b-256 |
78fcc7e1d348b7bee8eea59124fab0f41240a1c569cb1158126364a662adf18f
|
File details
Details for the file redact_pdf-0.0.3-py3-none-any.whl.
File metadata
- Download URL: redact_pdf-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.10 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f23d1fdc245408fc02f52dfd589631981d7735c1b6dbea5934027f926f4a398
|
|
| MD5 |
3fd8d44deaed0fd0bbd91b33af4de3be
|
|
| BLAKE2b-256 |
eb6e009ee7ec2b81a1f254a8ad10926fb94f236a5a901f3a069cc3eb82bea5fe
|