5 Replies Latest reply on Jul 19, 2013 4:11 AM by try67

    Delete Document Level Script Using JavaScript?


      Hello all.


      Is there a way for a document level script to delete itself? I am running Adobe Acrobat Professional 11.


      My situation is that I am currently analysing data using a Java application. The Java application taylors a script to suit each specific PDF, and then inserts it into the PDF automatically. When the PDF is opened, the script runs once and then is no longer needed.


      As the script is no longer needed it would be preferred if the script could automatically be deleted. Is it possible the script has access to the field in which it is stored (e.g. doc.javascriptField = "";)? Or by some miracle, a delete function already exists?


      I think that due to the lack of need for such a function by general and advanced users I won't get the answer I am hoping for. But it is worth a shot. In the mean time, I am inserting a flag into the KeyWord field so that the script does not run twice. It works, but it is not exactly clean.


      Any help would be greatly appreciated.



      Jonny O