These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Writing in a text file

Horn33t
Registered: Aug 27 2009
Posts: 20
Answered

Hi,
I'd like to know if it's possible to create and write in a text file with adobe JavaScript.
I already saw a topic like mine, and someone advise to use the report object.
I saw documentation on it, and the report object seems to write in a pdf document, but not in a text file.
Is there an object that can write in a real texte file ( *.txt) ?
Thanks a lot
Horn33t

My Product Information:
Acrobat Pro 9.1.3, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Acrobat can write tab delimited text file. This is documented in the JS API Reference under the 'exprotAsText()' method. This solution was designed to write form data to an Excel file.

George Kaiser

try67
Expert
Registered: Oct 30 2008
Posts: 2398
You can create a plain text file using the createDataObject method.
However, it will create the file as an attachment in the PDF. Adobe changed recently the security settings and in the later versions it's more difficult to export it from there to the actual local drive using a script, but you can still do it manually.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
You could even cresate a report and save the PDF report as a text file.

George Kaiser