Skip to content
Discussion options

You must be logged in to vote
#!/usr/bin/env python

import fitz

# Open the PDF file
doc = fitz.open("PyMuPDF example.pdf")

# Get the first page of the document
page = doc[0]

#### BEÑAT BLACKLINE TEXT ####

# Define the area to be redacted
rect = fitz.Rect(133.01550874920002, 87.82992395007999, 163.929577416, 94.73601638912)

# Create a redaction annotation with black color fill
page.add_redact_annot(rect, fill=(0, 0, 0))

#### BUSTAMANTE BLACKLINE TEXT ####

# Define the area to be redacted
rect = fitz.Rect(163.85502549240002, 87.91132582719999, 219.9595896564, 94.70768072959999)

# Create a redaction annotation with black color fill
page.add_redact_annot(rect, fill=(0, 0, 0))

#### BEÑAT BLACKLINE IMAGE ####

# D…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bbustamante
Comment options

Answer selected by JorjMcKie
@JorjMcKie
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants