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
No, not really.
Copy link to clipboard
Copied
No, not really.
Copy link to clipboard
Copied
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.