Sample code for removing js from PDF?

Specifically, how do I use Aspose.PDF to remove all javascript from a PDF? I see the JasvScripts.Remove method, but how do I find all of the js to remove?

Hi Roslyn,


Thanks for your query. I’m moving your query to the related forum;Aspose.PDF. There one of my colleagues will answer you soon.

Best Regards,

Hi Roslyn,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.Pdf.

Please use Strip method of PdfJavaScriptStripper Class to remove the Javascript from a PDF file which takes input and output files / streams as parameters. Please see the following links for details regarding Strip methods available.

Strip Method
Strip Overload_1

Please feel free to contact support in case you need any further assistance.

Thank You & Best Regards,