Free Support Forum - aspose.com

JavascriptAction Garble

Hi.



Add a script in ActionJavaScript of Aspose.Pdf

When you make a password set, the script you

ave set are garbled.

The script does not run

Are you sure you want if how resolved?



-----------------------------

Aspose.Pdf.Document doc = new Aspose.Pdf.Document(@“C:\work\test.pdf”);



string script = “app.alert(‘TEST’);”;



Page page = doc.Pages[1];

page.Actions.OnOpen = new JavascriptAction(script);



doc.Encrypt("", “pass”, DocumentPrivilege.ForbidAll, CryptoAlgorithm.RC4x128, false);



doc.Save(@“C:\work\test_out.pdf”);

-----------------------------





Aspose.Pdf ver.10.7.0.0



Thanks for taking care of it.

Hi Yuya,


Thanks
for using our API’s.
<o:p></o:p>

I have tested the scenario and I am able to notice the same problem. For the sake of correction, I have logged this problem as PDFNEWNET-39348 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.