PDF - OCR a zone on every page

Discussions about image processing and document imaging.
Post Reply
ssaunders
Posts: 6
Joined: Mon Aug 13, 2012 11:39 pm

PDF - OCR a zone on every page

Post by ssaunders » Wed Feb 05, 2014 3:32 pm

Hi,

Can anyone please provide a code snippet showing how I can do the following:

1. Load a multi-page PDF file. It will need to process image-only PDF's as well as searchable PDF's
2. OCR a zone (ROI) on every page to see when the value changes

My current attempt gets the data on the first page, but I can't figure out how to get it to scroll through all pages. I know it must be something small I'm missing. I really need to get this done as soon as possible. Any help is greatly appreciated!


Scott

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: PDF - OCR a zone on every page

Post by SamiKharma » Mon Feb 24, 2014 4:26 pm

Hi,

You just have to iterate in a loop from 1 to PageCount (known through GdPicturePDF.GetPageCount())
For iteration:
1. SelectPage(currentIteratorValue)
2. Use the SearchText method with the coordinates that you want for the ROI.

If you cannot accomplish the above, please do indicate so and we will provide with a code to do so.

best,
Sami

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests