Can I get the XY Coordinates of a text in PDF

Hello:


Good morning / evening!

I am looking to redact a list of words in my PDF documents. I know of Extract text to get the text and annotation option to draw the rectangle to annotate. What I am missing is how do I know the coordinates of the words that I am looking for?

Hope there is a way to figure that out!

All helps appreciated

Maddy

Hi Maddy,


Thanks for your inquriy. You may search text using TextFragmentAbsorber and use Rectangle property of TextFragment to get coordinates of the text.

However Aspose.Pdf provides feature to redact certain page area of PDF. For redacting text, you may search text from the PDF document and use its rectangle to add RedactionAnnotation. It will help you to accomplish your requirements.

Please feel free to contact us for any further assistance.

Best Regards,