I am trying to embed JavaScript into pdf that is created using iTextSharp and it is working absolutely fine if it is a file as shown in the code.
But when I try to e
Your PDF is not rendered yet... I am not sure if PDF has a onreadystate event or not but see... http://mattheyan.blogspot.com/2010/06/add-javascript-to-pdf-document-with.html
In short you need a setTimeout
Here is an example using Docotic.Pdf http://www.codeproject.com/Articles/380293/Javascript-in-PDF