Use this code:
Well, that has certainly put me in the right direction. Thanks heaps.
The only problem now is that I am using iText library in Java to insert the the script. It does not name the script.
Maybe I will try adding the script within the script (escape characters omitted for simplicity).
I will try it tomorrow and hope for success. Once again, thanks for your reply.
The problem with that is that if the file is used in Reader it won't work
because it can't execute the addScript command...
Try to find out what's the default name of the script used by the
My original idea of...
Did not work.
However, while debugging I did come across the name given to a script added via iText (Java library). The default is "000000000000000". With any added scripts being incremented by 1. So the this.removeScript("ScriptName") function works perfectly.
That's useful info... Thanks. It's a shame they didn't include that in the
API documentation, or added an extra (even optional) parameter to this
method to allow you to set the name of the script you're adding.