Hi there,
I need to execute some javascript when the document opens and closes. I don't see anywhere in your documentation how I can bind javascript objects to document events (App/Init, Doc/Close, Doc/Save etc...). Is that not supported?
If I use Merger with a document cointaining such javascript, will it be preserved? If so, what edition of Merger would I need?
Thank you
Preserve document javascript w/ events
Re: Preserve document javascript w/ events
Support · Jul 19, 2006Hello,
You can associate a Javascript with the document generated using our product using the Document class JavaScript property. Following is the sample code:
[Visual Basic]
Dim MyDocument As Document = New Document()
MyDocument.JavaScripts.Add(New DocumentJavaScript("Say Hi", "app.alert(\"HelloNot Not \")"))
[C#]
Document document = new Document();
document.JavaScripts.Add( new DocumentJavaScript( "Say Hi", "app.alert(\"Hello!!\")" ) );
Yes, the JavaScript from existing PDF document will be preserved when merged using our Merger for .NET product. You will need the Enterprise Edition in order to be able to bind the JavaScript with the PDF document.
Thanks,
ceTe Software Support Team