Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
0

OCR Data extraction

Guest
Jul 04, 2017 Jul 04, 2017

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

TOPICS
Acrobat SDK and JavaScript
1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 04, 2017 Jul 04, 2017

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

...
Translate
LEGEND ,
Jul 04, 2017 Jul 04, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 04, 2017 Jul 04, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 04, 2017 Jul 04, 2017

No it's not.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 04, 2017 Jul 04, 2017
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines