How to calculate the region to extract text from a PDF using the rectangle area

Hi,


My requirement is to extract text from a PDF using the specified region.
But i am facing problem while specifying co-ordinates for the region (refer below code)
absorber.TextSearchOptions.Rectangle = new Aspose.Pdf.Rectangle(1178, 3030, 1906, 3230);

Now in order to understand the parameter accepted by Rectangle method, I searched the forum and got that it refers origin as left-bottom and it accepts some different measuring unit.

My question is there any simpler tool (MS-paint/Adobe PDF Reader) or some other tool which would allow me to get the co-ordinates easily without much hustles (without having to apply any formulas).

Looking forward a quick respsone.

Thanks

Hi Anushree,


Thanks for your inquiry. Yes you are right, Aspose.Pdf page origin is left bottom(0,0) and its measuring unit is point and where 1 inch = 72 points and 1 cm = 1/2.54 inch = 0.3937 inch = 28.3 points.

In reference to your question about some tool to get coordinates, you can enable ruler and grid options in Adobe Acrobat and get the coordinates of the desired regions. But origin of the Adobe Acrobat is left upper corner of the page, so for y coordinates you need a little calculation to get coordinates form left bottom, multiple it by 72 to change it into the points.

Please feel free to contact us for any further assistance.

Best Regards,