WebAIM - Web Accessibility In Mind

E-mail List Archives

Acrobat and JavaScript question

for

From: R.U. Steinberg
Date: Jan 31, 2020 8:34PM


I have searched acrobatusers.com, adobe.com, and other sites and come up
empty. I have several 20 page PDF files that were created by a third party
designer.

It was bad enough that it was exported from Adobe InDesign without tags and
I had to add them manually. Now I've learned that some of the tags have
spelling errors in them. Visually, a word may look like "Certificate" but
if you were to listen to it with JAWS, the word is pronounced "Certifcate"
(missing a letter "i") because the word in the tag is spelled wrong.

I know I can manually copy the contents of each tag in the tag tree one at
a time (right click on a paragraph in the tag tree and select "Copy
Contents to Clipboard"), paste into something like MS Word and run a spell
check. Then once I find a spelling error I can use "Actual Text" field in
the tag properties to spell words correctly. I also know a little
JavaScript and have tried to make sense of the Adobe manuals, but have had
no luck. I'm hoping that everything in the tag tree is some sort of
"object" but can't find the reference in the manuals.

What I'd like is some sort of a batch process that can run through the
whole file and export the content of all the tags into plain text or
something like that. Not export the PDF as plain text, but the content in
the tags as plain text. I hope that makes sense.