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

mySaveAs function not working

New Here ,
Jun 26, 2020 Jun 26, 2020

Copy link to clipboard

Copied

Hello, Can anyone help me with this?  Below code is working fine on my one machine but not working on other machine. Even everthing is just same as of machine Ist on the 2nd machine.   I have created config.js file with below code at C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\Javascripts

 

Condition if(typeof(mySaveAs) == "function") is returning true on machine 1 and returning false on machine the 2nd. 

please help me out.


var mySaveAs = app.trustedFunction(
function(oPdf,cPath,cFlName)
{
app.beginPriv();
cPath="/c/temp/";
cPath = cPath.replace(/([^/])$/, "$1/");
try{
oPdf.saveAs(cPath + cFlName);
}
catch(e){
app.alert("Oops!! Something went wrong.");
}
app.endPriv();
}
);

  

[Moved from Community Help to Acrobat Reader.]

TOPICS
How to

Views

339

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 ,
Jun 27, 2020 Jun 27, 2020

Copy link to clipboard

Copied

Can you guys please help me with this.

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 ,
Jun 27, 2020 Jun 27, 2020

Copy link to clipboard

Copied

1. Check the JavaScript console for messages. 

2. You must use your own made up name for this function. Using the name everyone else uses is a security risk. 

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 ,
Jun 28, 2020 Jun 28, 2020

Copy link to clipboard

Copied

LATEST

If the if-condition returns false it means the script is not installed correctly, or contains an error.

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