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

After an unrequested update I get an error attempting to write to a file error

New Here ,
Jan 10, 2025 Jan 10, 2025

Copy link to clipboard

Copied

Hi

 

Hope you are well

 

 

I was wondering if you can help me.

 

I have a Javascript, that provides a button, that when clicked, converts the open file to a jpg file and stores it in a folder

 

This was working perfectly but there seems to have been an update/change and it no longer works

 

I have checked all security settings and added the path for the storage

 

I am on a windows 10 machine, my adobe is set to not update, I discovered the layout was different and then was an option saying about not using this version which I clicked but it still doesn’t work

 

Can you advise

 

Atomizer_0-1736512299500.png

 

Atomizer_1-1736512299502.png

 

Atomizer_2-1736512299504.png

 

Atomizer_3-1736512299505.png

 

 

 

// Define the trusted function

var myTrustedFunctions = app.trustedFunction(function() {

    app.beginPriv();

    try {

        var savePath = "C:\\Users\\david\\Desktop\\Attachments\\FUW\\renewal.jpg";

        this.saveAs({

            cPath: savePath,

            bPromptToOverwrite: false,

            cConvID: "com.adobe.acrobat.jpeg"

        });

        app.alert("Document exported successfully to " + savePath);

    } catch (e) {

        app.alert("Error exporting document: " + e.message);

    }

    app.endPriv();

});

 

// Add a tool button to execute the trusted function

app.addToolButton({

    cName: "Renewal",

    cLabel: "Renewal",

    cTooltext: "Renewal",

    cExec: "myTrustedFunctions()",

    cEnable: "event.rc = (event.target != null);"

});

 

 

 

Best wishes

 

 

David 

 

 

TOPICS
General troubleshooting , JavaScript

Views

65

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 ,
Jan 10, 2025 Jan 10, 2025

Copy link to clipboard

Copied

Enable protected mode at startup prevents writing to a directory.  Uncheck the box and restart Acrobat.

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
New Here ,
Jan 10, 2025 Jan 10, 2025

Copy link to clipboard

Copied

Hi Thank you so much for your help, works now, greatly appreciated 

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
Adobe Employee ,
Jan 21, 2025 Jan 21, 2025

Copy link to clipboard

Copied

LATEST

Hi,

 

I hope you're doing well. Apologies for the delayed response and trouble.

 

We're glad to hear the issue has been resolved! If you need any further assistance, please don’t hesitate to reach out.

 

For future reference, you can explore this Adobe article for more details: Protected Mode Troubleshooting in Acrobat Reader.

 

Thanks,
Anand Sri.

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