Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Weird AcroJS problem!
  FAQ FAQ  Forum Search   Register Register  Login Login

Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Weird AcroJS problem!

 Post Reply Post Reply
hadesp View Drop Down
New Member
New Member

Joined: 30 Jun 2013
Points: 1
Post Options Post Options   Quote hadesp Quote  Post ReplyReply Direct Link To This Post Topic: Weird AcroJS problem!
    Posted: 30 Jun 2013 at 3:32am

Hi Guys!


I made this simple spell check script last week so that I could spell check some documents properly but while tinkering with it yesterday, I accidently introduced an error in it. Now, whenever I execute it, the thermometer shows up but does not progress. If I press the button again, the thermometer starts progressing and the script executes but then the thermometer does not close. It was working perfectly earlier and I cannot locate the source of this error. The code is almost the same as before to my eyes. I've been trying for hours to fix this issue but without success. The code is as below:



app.addToolButton({cName: "Spell Check", cExec: "spellcheck();", cTooltext: "Spell Check", nPos: 0 });

function spellcheck()

var numWords, ckWord;

var t = app.thermometer;

t.duration = this.numPages;


        for (var i = 0; i < this.numPages; i++ )


            numWords = this.getPageNumWords(i);

            t.value = i;

            t.text = "Processing page " + (i+1) + " of " + (this.numPages);   

            for (var j = 0; j < numWords; j++)


                ckWord = spell.checkWord(this.getPageNthWord(i,j));

                    if (ckWord != null)

                        { this.addAnnot({ page: i, type: "Squiggly", quads: this.getPageNthWordQuads(i,j), author: "script", contents: this.getPageNthWord(i,j) + ": " + ckWord.toString() });}   


                if (t.cancelled){ break;}



  app.alert ("Spell check done.",3);



I really need to make it work properly again. Any help would be much appreciated!


I also needed to know as to how do I force the use of a specific dictionary for this spell check. It currently uses all the available dictionaries even when I am passing a subset of spell.dictionaryNames to the spell.checkWord method. The acrobat object reference guide mentions that we also have the following dictionaries available in acrobat :


English USA Medical

English USA Legal

English USA Sci/Tech

English USA Geo/Bio


Could any one point me as to where to find these dictionaries as they are not installed in the default package.Only English USA is there.


I am using Acrobat 9 pro and X pro.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.031 seconds.