Javascript

Javascript

Forum member · Oct 22, 2008
Hello, Is there a way to execute a javascript action on the load of the pdf? If I create a DocumentJavaScript Dim myjava As New ceTe.DynamicPDF.DocumentJavaScript("test", "alert.beep(1)") MyDocument.JavaScripts.Add(myjava) Can this script be associated and run with an event such as document load? Thanks in advance

Re: Javascript

Support · Oct 22, 2008
Hello, The JavaScript in the code below will execute on loading the PDF in the browser. Thanks, ceTe Software Support Team

Re: Javascript

Forum member · Oct 22, 2008
Hello, I don't see the code below.

Re: Javascript

Support · Oct 23, 2008
Hello, The JavaScript you are adding using the DocumentJavaScript class will run when opening the PDF document. So the code you have given in the first post will also run when you open the PDF. Please make sure that you are adding a correct JavaScript without any typos or mistakes and it will work without any problem. Thanks, ceTe Software Support Team.