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,

Thank you for considering Aspose.Pdf.

Please use the Strip method which removes JavaScript from a PDF file. The method of PdfJavaScriptStripper Class takes input and output files/ streams as parameters. For more details on the Stripp methods available, see the following links:

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

Thank You & Best Regards,