Skip to main content

redact a phrase off a pdf file

Project description

redact-pdf

Release Build status codecov Commit activity License

Redact a phrase off a pdf file


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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

redact_pdf-0.0.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

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

Hashes for redact_pdf-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b9d564db9695d8d6e979c9f0c15146c2a8cc24b0d721d246224820f4597df116
MD5 858e84e77e184437ee7e1b5a8f044431
BLAKE2b-256 78fcc7e1d348b7bee8eea59124fab0f41240a1c569cb1158126364a662adf18f

See more details on using hashes here.

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

Hashes for redact_pdf-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0f23d1fdc245408fc02f52dfd589631981d7735c1b6dbea5934027f926f4a398
MD5 3fd8d44deaed0fd0bbd91b33af4de3be
BLAKE2b-256 eb6e009ee7ec2b81a1f254a8ad10926fb94f236a5a901f3a069cc3eb82bea5fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page