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

spell check a folder

New Here ,
Apr 02, 2018 Apr 02, 2018

Copy link to clipboard

Copied

Hi!

I'm using Acrobat DC Pro. I want to spell check a folder of documents one by one using Javascript. I want a dialog box to pop up only if there is a spelling error in a file. I only want the dialog for when there are errors. I want to be able to correct the error via the dialog box. After I correct the error, I  want  the spell checking to continue until the end of the folder.

Alternatively: I want a javascript program to spell check a folder a file at a time and to copy only the files that have an spelling error to a temporary folder.

thanks!@ !

TOPICS
Acrobat SDK and JavaScript , Windows

Views

315

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 Expert ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Is the text that you want to check static text or part of a comment or a

field?

Votes

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
New Here ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

the main body of the document

Votes

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 Expert ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

OK, in that case the first part is not possible, as a script can't change the actual text of the file. It can highlight the misspelled words, but that's about it.

The second part is possible. You would need a script that iterates over all the words in the file and spell-checks each one (using a pre-defined dictionary). If a misspelling is found the file can be saved to another folder and the loop can be broken.

You would then use this script in an Action on your files.

I've developed a Spell-Check Suite for Acrobat (See: Custom-made Adobe Scripts: Acrobat -- Spell Check Suite ), so creating such a script and putting it in an Action should not be too difficult. If you're interested feel free to contact me (try6767 at gmail.com) and we could discuss it further.

Votes

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
New Here ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

I think I'll try exporting the whole folder of files to text files and then using the natural language toolkit to find misspellings. Do you know if there is a way for javascript to export a whole folder of files in a loop so I don't have to do each one at a time.

Votes

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
New Here ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Isn't that as simple as using a loop with the javascript saveAs command with the line that uses SaveAs then the filename.rtf or the filename.txt that I want the pdf exported to?

Votes

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 Expert ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

LATEST

No. You would need to use an Action (via Tools - Action Wizard) and then set it to save the files its processing as text files. You actually don't need JS at all to do it.

Votes

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