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

"createDataObject" in Adobe reader

Community Beginner ,
Mar 04, 2019 Mar 04, 2019

Copy link to clipboard

Copied

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

Views

803

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

correct answers 1 Correct answer

Community Expert , Mar 04, 2019 Mar 04, 2019

No, not really.

Votes

Translate

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

Copy link to clipboard

Copied

No, not really.

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

Copy link to clipboard

Copied

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.

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