Is there a way to read the document level javascripts from a pdf?
Hi Kevin,
Thanks for contacting support.
Currently Aspose.Pdf for .NET supports the feature to add or remove JavaScript from PDF file but it does not support the feature to get/read all JavaScript from PDF document. However for the sake of correction, we already have logged this requirement as PDFNEWNET-38836. We will further look into the details of this requirement and will keep you posted on the status of correction. please be patient and spare us little time. We are sorry for this inconvenience.
Meanwhile you may consider looking over following links for information on
- [Adding JavaScript (DOM)]
(http://www.aspose.com/docs/display/pdfnet/Adding+JavaScript+%28DOM%29)
- [Create JavaScript Link in Existing PDF File (Facades)]
(http://www.aspose.com/docs/display/pdfnet/Create+JavaScript+Link+in+Existing+PDF+File+%28Facades%29)
Code to trim JavaScript from PDF file.
[C#]
// strip JavaScript from PDF file<o:p></o:p>
PdfJavaScriptStripper oldpjs = new PdfJavaScriptStripper();
oldpjs.Strip(“PdfJavascriptStripper.pdf”,“PdfJavascriptStripper_WithoutJavaScript.pdf”);
Yes, I have a requirement for reading the existing JavaScript. Please let me know if/when this becomes possible with Aspose.Pdf.
Hi Kevin,
Hello Aspose Team,
Has the feature to read all existing JavaScript been implemented? I need this for my use case.
Regretfully the feature is not yet implemented. However, we will surely inform within this forum thread as soon as it is available. Please spare us some time.
We are sorry for the inconvenience.