Annotating signature blocks #2409
Unanswered
djoltes
asked this question in
Looking for help
Replies: 1 comment 8 replies
-
I have worked with textract. The main thing is, that you are not being told the original's page dimension as far as I remember.
|
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Wondering if anyone has tried this...I'm working on a project to automatically redact PDFs, and the next step is to try removing handwritten signatures. I'm testing use of AWS Textract's signature capability; so far it seems to be working but I'm stuck on how to apply an annotation using the returned data.
It requires an image, so I'm grabbing the pixmap of a page and converting it to a jpg:
Example output:
Item: 47ec04b6-a00f-4263-b540-db8fda022c18, geometry {'BoundingBox': {'Width': 0.310680091381073, 'Height': 0.05060103163123131, 'Left': 0.11123588681221008, 'Top': 0.6378791332244873}, 'Polygon': [{'X': 0.11123588681221008, 'Y': 0.6380218267440796}, {'X': 0.4218907356262207, 'Y': 0.6378791332244873}, {'X': 0.4219159781932831, 'Y': 0.6883060932159424}, {'X': 0.11127414554357529, 'Y': 0.6884801983833313}]}
Has anyone tried converting Textract coordinates into a set of fitz x/y values that will redact the identified signature block? It seems like it could be done with a fitz.rect() annotation, but I'm not sure if what Textract provides will match what PyMuPDF thinks are the coordinates.
Thx for any ideas...
Beta Was this translation helpful? Give feedback.
All reactions