Remove ALL the Javascript in the PDF documents

Hi. I want to remove javascript totally from my PDF documents.Instead of just removing the js code only, is there any way to remove the whole object ? For the result below, I’m using PdfJavaScriptStripper class (.NET).

original:

95 0 obj
<</S/JavaScript/JS(\012/* Set day 2 */\015\012FormRouter_SetCurrentDate(“2”);\015\012\015\012\015)>>
endobj

processed:

95 0 obj
<</S/JavaScript/JS()>>
endobj

@zhilin39

Thanks for contacting support.

Would you please share a sample PDF document with us? We will check the details at our side and log the an investigation ticket accordingly.

Hi.
Sure. Here’s the sample PDF document that I’ve tried out. JSPopupCalendar.pdf (171.9 KB) thanks.

@zhilin39

Thanks for sharing the sample document.

We have already logged a similar feature request in our issue tracking system as PDFNET-38670. We have recorded your concerns and shared all details with the logged ticket as well. As soon as we have some significant updates regarding availability of feature, we will let you know. Please be patient and spare us little time.

We are sorry for the inconvenience.

@asad.ali

Hi,

any updates on this issue ?

Thanks

@zhilin39

Thanks for your inquiry.

I am afraid that earlier logged issue has not been yet resolved due to large number of pending issues in the queue. Product team will definitely plan to provide a fix against logged issue as per their development schedule and as soon as we receive some significant updates in this regard, we will let you know. Please be patient and spare us little time.

We are sorry for the inconvenience.

@asad.ali

Hi,

still no update on this issue ?

Thanks

@zhilin39

Thanks for contacting support.

As shared earlier, there are high numbers of pending issues in the queue which were logged prior to your issue and our product team has been working to resolve them. Please also note that this issue has been logged under normal/free support model and it will be resolved on first come first serve basis. We will definitely let you know once a significant progress is made towards resolution of the ticket. We greatly appreciate your patience and comprehension in this matter. Please spare us little time.

We are sorry for the inconvenience.

@asad.ali

Hi,

I kept on asking because I need the feature urgently. Sorry for any inconvenience caused and thank-you for your reply.

Thanks

@zhilin39

Thanks for writing back.

We greatly appreciate your response, however you may please inquire for an update whenever you want to. Furthermore, we keep checking the logged issues for resolution status and as soon as we notice some progress towards fix of the issue, we surely notify in the respective forum thread.

In case you need the fix urgently and this issue is blocker, you may please check Paid Support model where reported issues have precedence over the issues logged under free/normal support model. We recommend Paid Support subscriptions to our customers who want their issues to be fixed on urgent basis. For more information, you may please visit Paid Support FAQ page. In case of any other inquiry, please feel free to contact us.

Hi,

It have been a year, is there any updates ?

@zhilin39

We would like to share with you that an issue has been resolved in Aspose.PDF for .NET 19.4 where PdfJavaScriptStripper was not removing JavaScript references and stream completely from PDF document. Currently the issue has been fixed in latest version within Facades API. We also intend to offer similar feature in DOM model and will let you know as soon as it is available.

Please try using latest version of the API and in case you still face any issue, please feel free to let us know.

Hi team,
Remove ALL the Javascript in the PDF document It is not working.PdfJavaScriptStripper javascriptStripper = new PdfJavaScriptStripper();
//remove all javaScript from PDF file
bool result = javascriptStripper.Strip(“Template/input.pdf”, “Template/output.pdf”);

@arun762050

Would you please share your sample PDF document with us. We will test the scenario in our environment and address it accordingly.

purchase_order.pdf (143.6 KB)
after using Strip code. I am able to click add button. which means javascript still enable. Please provide quick solution.

Hi team, Did you check this issue in aspose c#?

@arun762050

We tested the scenario in our environment while using Aspose.PDF for .NET 20.10 and were able to notice that all JavaScript was not removed from the document. Hence, we have logged an issue as PDFNET-48974 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Thanks for reply. please provide solution on this ASAP.

@arun762050

We will surely work to resolve the issue. However, it will be investigated and fixed on first come first serve basis. We will inform you as soon as we have some news about the issue fix. Please give us some time.

We are sorry for the inconvenience.

Thank for your reply.