5 Replies Latest reply on Jul 4, 2017 12:39 PM by try67

    OCR Data extraction

    chaseg22

      Hello,

      I many PDFs that I read in using Acrobat DC and I always need the top table on the second page of each PDF, I store these values in excel and later into a database.

      Is there  a way to automate this with javascript?

      Ideally I just need a way to quickly get data from the top table on the second page.

       

      thanks

        • 1. Re: OCR Data extraction
          Dave Merchant MVP & Adobe Community Professional

          A reliable solution is very unlikely. In the API, the only way you can 'read' a word from a page is the doc.getPageNthWord() method, which only gets one word, based on the page's internal content ordering.

           

          In theory if every table was identical you could read each word separately and rebuild them into a string, but when you OCR a document the concept of word order, and word breaks, is variable to say the least. If your word counts are different in each document you'd have no idea how many to read, and there's no way in JavaScript to work out what is and is not a table cell; you're not dealing with HTML.

          1 person found this helpful
          • 2. Re: OCR Data extraction
            chaseg22 Level 1

            So I'm guessing its not possible to do zone OCR with Acrobat DC? Ive seen other software that allows you to select specific zones from a pdf then create a form, which than is used as a template for other forms to extract the data in those zones.

            • 3. Re: OCR Data extraction
              Dave Merchant MVP & Adobe Community Professional

              No it's not.

              1 person found this helpful
              • 4. Re: OCR Data extraction
                try67 MVP & Adobe Community Professional

                You can't limit the OCR process to just a part of the page, but you can extract just the text from a pre-defined area.

                That requires quite a complex script, though.