I have disabled JavaScript as explained in
https://forum.pdf-xchange.com/ ... 36&t=21352
Seems that if there are multiple scripts in a PDF document, the viewer asks user for permission to execute each script separately:
---
This document contains JavaScript. Do you wish to enable all JavaScript actions in this document?
The document may not behave correctly if they are disabled.
[ ] Suppress this message - until this document is reopened
---
Even if I tick the "Suppress this message" box, the permission query is presented for all scripts in the document. Is there any way in the API to force the viewer to remember user's choice?
User's choice to suppress a message is not obeyed
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: User's choice to suppress a message is not obeyed
Hi, mbertin.
You may use it to suppress this warning for all documents:
HTH.
You may use it to suppress this warning for all documents:
Code: Select all
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.
Re: User's choice to suppress a message is not obeyed
Thanks for the answer.
works as expected (warning is not displayed at all). But if I want the viewer to present the warning only once each time a document is loaded, can I do that? Seems that each script in a document (if there are multiple scripts) triggers separate warning dialog. To elaborate the use case a bit more, our software allows the user to scroll list of documents (including PDFs) and shows a preview of the the selected document using the viewer API next to the listing. If a PDF contains multiple scripts embedded, it would be more user friendly to show the warning only once when the user selects the document.
Code: Select all
pdfCtl.SetProperty("JavaScript.WarnOnExecute", "false");
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: User's choice to suppress a message is not obeyed
I'm afraid, but currently you have not possibility to get/control the document's private flag related to "Suppress this message - until this document is reopened".
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.