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

"createDataObject" in Adobe reader

Explorer ,
Mar 04, 2019 Mar 04, 2019

Hi All,

I am writing a script to spell check and create a log report in the adobe reader. My script works in acrobat pro. But in adobe reader its showing security error and per documentation we need "F" security level. is there is any alternate method to write a log as text file in acrobat reader

my script

function Spell_Check()

{

       

    var chWord, numWords;

    var Report;

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

    {

        numWords = this.getPageNumWords(i);

        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: "A.C.Acrobat",

                    //contents: ckWord.toString()                   

                    contents: (this.getPageNthWord(i,j))                   

                });

                Report = Report + "\t" + i + "\t" + (this.getPageNthWord(i,j)) +"\r\n";

                }

            }

    }/* Put script title here */

   

    myReport(Report);

}

var myReport = app.trustedFunction(function(Report)

{

    //app.alert(Report);

    app.beginPriv();   

    this.createDataObject({cName: "Report.txt", cValue: Report});

    this.exportDataObject({cName: "Report.txt", nLaunch:0});   

    app.endPriv();

});

Thanks,

Balav

TOPICS
Acrobat SDK and JavaScript
1.0K
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

correct answers 1 Correct answer

Community Expert , Mar 04, 2019 Mar 04, 2019

No, not really.

Translate
Community Expert ,
Mar 04, 2019 Mar 04, 2019

No, not really.

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 ,
Mar 04, 2019 Mar 04, 2019
LATEST

About the best you can do is write the report string to a text field, the JavaScript console, or a text field in a custom dialog, and the user could manually copy & paste into a text editor, and then save.

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