I'm blacking out some information from several PDF's but there are some of these that the rectangles made by "draw_rect" functions are't being drawn correctly. I have checked the rectangles and they look right, that and I'm also usind the "add_redact_annot" with the exact same rectangle and works good.
def hide_text_rects(page, rects):
for rect in rects:
page.add_redact_annot(rect)
page.draw_rect(rect, color=(0,0,0), fill=(0,0,0))
The rectangles seem to be mirrored and zoomed (scaled). I really don't know what to do because I don't find any info related in the docs.
Edit: I found that the PDF's with version 1.7 are the ones working correctly. And the other ones are version 1.5.