Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Acrobat Javascript OCR Example

Community Beginner ,
Jun 12, 2021 Jun 12, 2021

I am looking for a Javascript example that executes OCR on a scanned document. I am having trouble finding the document methods that perform that and other Acrobat actions on a PDF document.

 

Thanks

TOPICS
JavaScript , Scan documents and OCR
3.5K
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 ,
Jun 12, 2021 Jun 12, 2021

There is no guarantee that JavaScript offers all the features of Acrobat. So you will find countless things you can only do manually.

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 Beginner ,
Jun 12, 2021 Jun 12, 2021

Can OCR be executed in Javascript? I am not looking for a "guarantee", just whether or not it is possible.

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 ,
Jun 12, 2021 Jun 12, 2021

No.

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 ,
Jun 12, 2021 Jun 12, 2021

Hi rjabend,

 

I am sorry but I do not do any scripting so I cannot answer your question. HOWEVER, if you scan a document and save it as a png, or jpg, after converting that document to a PDF, you then have to go do an extra step to do the OCR process. On the other hand, if you save that document as a TIF, when opening that document in Acrobat, it will convert the document to a PDF AND also self-initiate the OCR process.

 

Just a small tip that might help you.

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 Beginner ,
Jun 12, 2021 Jun 12, 2021

Nice tip! I was not aware of that. Thanks!

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 Beginner ,
Jun 20, 2021 Jun 20, 2021

I tried your suggestion and the resultant Acrobat PDF file is not OCR'd automatically. Is there a setting or something else I am missing?

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 ,
Jun 20, 2021 Jun 20, 2021

Yes, but this is a setting that is well hidden (and not available for PNG and JPEG formats): 

 

Capture_435.pngexpand image


PDF Acrobatic, InDesigner & Photoshoptographer
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 Beginner ,
Jun 20, 2021 Jun 20, 2021

Is it ever lol, but it also appears it can be set for many file formats other than tiff. Thanks again!

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 ,
Jun 20, 2021 Jun 20, 2021

(Thanks JR Boulay for that screenshot!)

 

Actually no. If you want automatic OCR-ing without a second step, you have to scan into the TIF format. Try it and see: if you scan into PNG or JPG, Acrobat will convert into a PDF but then it stops. To proceed with the OCR process, you then need to go into the Scan & OCR Tool, and then select the appropriate option for recognizing text

 

2021-06-20_08-35-19.pngexpand image

 

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 Beginner ,
Jun 20, 2021 Jun 20, 2021

It appeared under BMP scanned optimization preferrences that OCR was possible. Thoughts? 

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 ,
Jun 20, 2021 Jun 20, 2021

Ah, well that adds to my education.

 

As a Mac user, BMP are kinda irrelevant so I'd not have thought to even look to see what options they provide. So my bad.

 

So yes, TIFs and BMPs (the latter for the PC inclined :>))

 

Thank you!

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 Beginner ,
Jun 21, 2021 Jun 21, 2021
LATEST

Thank you!! I gained considerable education from your reply!

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 ,
Jun 21, 2021 Jun 21, 2021

"It appeared under BMP scanned optimization preferrences that OCR was possible. Thoughts? "

You can use any image format where this option is available since images will be discarded after OCR and PDF conversion (using JPEG2000 compression).

🙂


PDF Acrobatic, InDesigner & Photoshoptographer
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