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

Acrobat Form fillable PDF Javascript - How can we write to text file

New Here ,
Jun 25, 2020 Jun 25, 2020

Copy link to clipboard

Copied

Can somebody help me to write text into the txt file at some fixed location.
Example  var text = How are you

and want to write this text into the abc.txt file and save this on C:\temp\

TOPICS
Acrobat SDK and JavaScript

Views

174

Likes

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

Copy link to clipboard

Copied

There's no simple way of doing that. You can create an attachment and then export it, but the user will have to select where it is saved.

Likes

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

Copy link to clipboard

Copied

Thank you for your quick reply, How do I create a custom attachment with specific data (Like I just want the text How are you in that attachment). and I'm using Adobe Acrobat DC
Is this something you are saying...

var testData = "Testing";
this.createDataObject({cName: "test.txt", cValue:testData });
this.exportDataObject({cName: "test.txt", nLaunch:0});

If yes, It's working for me on my local machine, but not working on a server. 

 

Likes

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

Copy link to clipboard

Copied

You're not allowed to use Acrobat on a server anyway...

Likes

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

Copy link to clipboard

Copied

We don't have acrobat there on server, Will it work with Adobe Reader?

Likes

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

Copy link to clipboard

Copied

You can't use Acrobat Reader on a server either. What is the big picture here? Perhaps we can help you find a suitable product.

Likes

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

Copy link to clipboard

Copied

Problem:- I have created a fillable PDF with SAVE AS, which is working perfectly fine.

Now I need to create XML file with SOME controls values, so what I did I just created a string with XML nodes/elements and now I need to save that string into txt or xml files. 

and I have acrobat on local machine and on server I have reader Only.

 

Likes

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

Copy link to clipboard

Copied

Please can you explain more about the requirement for the server. What would run the process on the server? 

Likes

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

Copy link to clipboard

Copied

I need to design a fillable pdf for someone who has only Adobe Reader or Acrobat and PDF has textboxes where the user can fill details into it and save as with the user name. (Everything is working as desired till here).

and now we need to store that textboxes values into the database.

1) So either we can create a xml file with SOME specific controls value and I will write a code in any programming language to import that XML into the database.

2) or we can write javascript into acrobat so that javascript directly inserts values into the database.

but both ways are not working for me.

 

 

Likes

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.

Likes

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

Copy link to clipboard

Copied

LATEST

No need to reinvent the wheel, there is a well established process for getting data from a filled in PDF to a database on a server. Just submit the form data the usual way to an https script (cgi, asp, php or similar) on the server. All web scripts now need to be written by a professional web programmer as they are a major vector for attack. 

Likes

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

Copy link to clipboard

Copied

No. And you can't use that on a server, either.

Likes

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