We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

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 18.3.0.0

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

@dunghnguyen,

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

@imran.rafique
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.

Thanks,
Dung H.Nguyen

@dunghnguyen,

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