I have to extract text from a pdf doc within a specific rectangular region. The work-flow is as following. First of all pdf is converted to an jpg image. Then user draws selection rectangle on top of the picture. Then I somehow need to extract all text from pdf doc within that selection region. Any suggestions what freeware pdf libs accessible from C# to use?
Share
I agree, OCR is not the approach to use here. You need a PDF library that can extract the text along with the bounding box coordinates.
QuickPDF is a commercial library (www.quickpdf.com) that can extract the required information for a very reasonable price of $249. http://www.quickpdflibrary.com/help/quickpdf/DAExtractPageText.php is the function you are looking for. This will extract the text for the whole page and then you would need to use simple Point and/or Rectangle functions to limit the text to your selected rectangle.
I don’t believe iText has this capability based on my research.
You should also read How to extract text from a PDF?