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

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

New Here ,
Jun 25, 2020 Jun 25, 2020

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
1.6K
Translate
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

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.

Translate
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

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. 

 

Translate
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

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

Translate
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

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

Translate
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

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.

Translate
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

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.

 

Translate
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

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

Translate
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

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.

 

 

Translate
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

Can you guys please help me with this.

Translate
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
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. 

Translate
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

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

Translate
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