Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9099809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:42:46+00:00 2026-06-17T00:42:46+00:00

Trying to write to a text file w/ Adobe Acrobat Reader utilizing AcroJS. As

  • 0

Trying to write to a text file w/ Adobe Acrobat Reader utilizing AcroJS.

As a concept I got how to use trusted functions in Acrobat but when I tried to run following example to save (different problem then the original) the pdf form under a different name using this.saveAs(..) received an error.
My question is two fold;

1- Why do I get “Security settings prevent access to this property or method” error and how do I get rid of it?

trusted function in javascript folder is as follwos (copeid off the web)

  var mySaveAs = app.trustedFunction( function(cFlName)
   {
        app.beginPriv();
       try{
             this.saveAs(cFlName);
           }
         catch(e){
              app.alert("Error During Save " + e.message );
              }
         app.endPriv();
    });

I am calling the trusted function from the doucment as follwos and expecting a file with the name sample.pdf will be generated inside “C:/test”

     if(typeof(mySaveAs) == "function")
     { 
         mySaveAs("/C/test/sample.pdf");
     }
     else
     {
      app.alert("Missing Save Function");
     }

2- How do I write to a text file? Here I want to extract some field values from the PDF form and write those into a text file (or XML)!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T00:42:47+00:00Added an answer on June 17, 2026 at 12:42 am
    1. As you might have guessed, it’s a security measure to prevent malicious scripts from causing havoc. You’ll need to turn down the security settings. To do this, Ctrl+K into Preferences, go to the Enhanced Security tab and disable it.

      For addition information on Enhanced Security, refer to: http://www.adobe.com/devnet-docs/acrobatetk/tools/AppSec/enhanced.html

    2. As far as I know, there aren’t any functions that will allow you to write arbitrary data to a text file or XML file. However, you have a couple of options:

      • Use Doc.exportAsText (text) and Doc.exportAsFDF (XML) to export data from carefully crafted fields. This isn’t very straightforward and a little awkward, but it works.

      • Use Net.HTTP.request or Net.SOAP to send data to an ad-hoc local web server (eg: something simple, running Python or PHP) and let them handle the request. This allows you to do pretty much anything you want, but requires more work to setup the server.

      See: Acrobat JS API Reference

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to write a program to read a text file through args but
I am trying to write out a text file to: C:\Test folder\output\ , but
I am trying to write text to my txt file. After the first write
I am trying to write some messages to a text file using Debug.WriteLine(Message). Here
I am trying to write some simple code which will read a text file
Ultimately I'm trying to write out a range into a text file. When I
I am trying to write a program called encrypt that transforms a text file
I'm trying to find a way to write to a text file from as2.
I am trying to write a parser in Python for a special text file
I'm trying to write some text to a file using Files.write() method. byte[] contents

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.