Hi,
Is there a way to avoid embedded javascript to be executed when opening a pdf in the ActiveX Viewer? I did a test and I can automatically open a (potentially dangerous) web page using launchURL().
Since it is possible that my users open a pdf file that comes from an untrusted source (email) I want to avoid all automatically executed javascript.
Thanks,
Jan
Avoid javascript SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17901
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Avoid javascript
Hello Jan,
Disabling JavaScript in general could prevent some files from working properly, if they rely on some code for e.g. their form fields. A better approach would be to handle the events wherever a JS is executed.
I would recommend you to take a look here:
https://help.pdf-xchange.com/DEV/de ... c_js_event
Regards,
Stefan
Disabling JavaScript in general could prevent some files from working properly, if they rely on some code for e.g. their form fields. A better approach would be to handle the events wherever a JS is executed.
I would recommend you to take a look here:
https://help.pdf-xchange.com/DEV/de ... c_js_event
Regards,
Stefan
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Avoid javascript
Hi Jan.
HTH.
You may disable JS-executing fully by:I want to avoid all automatically executed javascript.
Code: Select all
pdfCtl.SetProperty("JavaScript.Enable", "false");
pdfCtl.SetProperty("JavaScript.WarnOnExecute", "false");
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 18
- Joined: Mon Apr 23, 2012 12:38 pm
Re: Avoid javascript
Thanks, works great.You may disable JS-executing fully by:
Jan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17901
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact: