Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Acrobat Javascript OCR Example

Community Beginner ,
Jun 12, 2021 Jun 12, 2021

Copy link to clipboard

Copied

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

Views

1.2K

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

No.

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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?

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

 

Capture_435.png

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

(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.png

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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!

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

"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).

🙂

Likes

Translate

Translate

Report

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