Find the Coordinates of Text or Image on a PDF

Hello,

I was wondering if anyone knew a way to find the coordinates of a particular image or even just text on a PDF document. I would want to know the X,Y coordinates for each corner or even just the center. I apologize for the vague question.

Thank you

Hi @edevries

Give a try to what’s mentioned in below post:

Also you can try CV activities for same.

Regards
Sonali

1 Like

Hi!
All the Computer Vision activities have an OutputRegion where you can get the identified Rectangle. Your input can be an image, a text or a type of control

1 Like

I see. So, this would require me to open the document up and look at it on screen rather than reading the document into memory in some sort of object?

Hi @edevries,

Yes, that’s right. Like we as a human would do. Open pdf, identify the image/text you would want coordinates for.

Output region as specified by @sbotan can be used. Also you can get idea about coordinates by even looking at its descriptor under its Properties->Target.

Refer below link:

Regards
Sonali

1 Like

Gotcha, thank you for your help. I was hoping to find a way to find positions of text without opening the document as a human would- but it seems like a much harder task than I initially thought.

I had a paid commercial license for a .NET library that allows you to find the positions of words, but I may lose access to this. Thanks for showing some alternatives.

Hi @edevries,

I understand what you mean.

But per my knowledge, there is no way to get coordinates without actually opening the document.

Even get position or clipping region activities would need the document open.

You can try either of these options.

Regards
Sonali