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

write text file using acrobat javascript.

crajeshbe
Registered: Aug 26 2007
Posts: 10

Hi, i want to write a text file using acrobat javascript. For example, If I click a link in the pdf file, it should write the text into the text file such as log file.

Please help me....

Thank you
C.Rajesh B.E

My Product Information:
Acrobat Standard 8.1.2, Windows
Lindy
Registered: Jul 17 2007
Posts: 30
Look at the Report object in the Acrobat Javascripting Reference. It may meet your needs for a log file. It has limited formatting options.
Writing files - depending on location, may require a trusted function.

Good Luck
Mark
crajeshbe
Registered: Aug 26 2007
Posts: 10
Thank you for your reply. Now i get an idea , there is way to do this.

Could you please give a exampe of code to save a text in text file say write "Thank you" in text file and save or overwrite the file.

Thank you
Regards
C.Rajesh B.E
Lindy
Registered: Jul 17 2007
Posts: 30
repOff = new Report();
repOff.size = 1.2;
repOff.color = color.black;
repOff.writeText("Thank You");

At this point you can open the Report.
if you want to save it to disk, you will most likely need to write a trusted function to do so.
There are a number of examples of saving files if you search for them.