Please provide all mandatory information!
Describe the bug (mandatory)
I have a document with double-layered text. One Layer of the text is redacted and another one is left as it is. Both the text are in the same area.
To Reproduce (mandatory)
microsoftout.pdf
# imports
import fitz
import sys
from matplotlib import colors
class Redactor:
doc = fitz.open('microsoftout.pdf')
# iterating through pages
for page in doc:
if not page._isWrapped:
page.wrapContents()
currentpage = page.number
dl = page.getDisplayList()
tp = dl.getTextPage()
clips=tp.search('cloud',quads=False)
for clip in clips:
print(clip)
getInfo=fitz.Rect(clip)
print(getInfo)
delta = fitz.Point(0, getInfo.height) * 0.3
new_rect = fitz.Rect(getInfo.tl + delta, getInfo.br - delta)
page.addRedactAnnot(new_rect, fill=colors.to_rgb('yellow'))
page.apply_redactions()
# saving it to a new pdf
doc.save('out.pdf',garbage=4,deflate=True,clean=True,linear=True)
print("Completed")
# driver code for testing
if __name__ == "__main__":
lines = sys.stdin.readlines()
redactor = Redactor()
redactor.redaction()
Expected behavior (optional)
Both the double-layered text should be removed.
Screenshots (optional)

Your configuration (mandatory)
Additional context (optional)
Please provide all mandatory information!
Describe the bug (mandatory)
I have a document with double-layered text. One Layer of the text is redacted and another one is left as it is. Both the text are in the same area.
To Reproduce (mandatory)
microsoftout.pdf
Expected behavior (optional)
Both the double-layered text should be removed.
Screenshots (optional)
Your configuration (mandatory)
Additional context (optional)