Exception when removing JavaScript

Hi team,

I have issues with Aspose Pdf when try to remove JavaScript in the file below.

Here is my sample code:
Aspose.Pdf.Facades.PdfJavaScriptStripper stripper = new Aspose.Pdf.Facades.PdfJavaScriptStripper();
stripper.Strip(inputFile, “output.pdf”);

I’m using Aspose Pdf

Dung H.Nguyen
Failed-to-remove-JS.zip (8.1 KB)


Your source PDF file contains a virus, kindly review and send us a valid PDF document. This is the error snapshot: https://i.imgur.com/qLgylhw.png

I opened the file with Foxit Reader, here is my result:
image.png (19.4 KB)

When opening with Adobe Acrobat Reader DC, my result:
image.png (27.3 KB)
Click OK and I easily get through it.

Please check the file. Sorry for that but I don’t have another files which both cleaned and stuck with above code.

Dung H.Nguyen


We managed to replicate the said error in our environment. It has been logged under the ticket ID PDFNET-44450 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.

The issues you have found earlier (filed as PDFNET-44450) have been fixed in Aspose.PDF for .NET 18.5. This message was posted using BugNotificationTool by asad.ali