Able to disable the unsafe attachment warning dialog?  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
stephen.starr
User
Posts: 123
Joined: Wed Mar 25, 2015 10:59 pm

Able to disable the unsafe attachment warning dialog?

Post by stephen.starr »

We have PDF's that have attachment annotations that load audio files. Every time I click the annotation there is a dialog that pops up warning the user it may be unsafe to load the attachment.

1. Is there a way to disable this dialog altogether? We are a closed system and we know the attachments are safe.
2. If not, there is a checkbox that says "remember my choice" which doesn't seem to work. Even when I check it, the next time I try to open the attachment I get the same dialog popping up.

Thank you,
Stephen
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Able to disable the unsafe attachment warning dialog?

Post by Sasha - Tracker Dev Team »

Hello Stephen,

Can you reproduce this behavior in the end user Editor?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
stephen.starr
User
Posts: 123
Joined: Wed Mar 25, 2015 10:59 pm

Re: Able to disable the unsafe attachment warning dialog?

Post by stephen.starr »

Alex, it does work in your editor.

Ultimately I do not want to show the dialog at all (your dialogs look much different than ours). Can I suppress it somehow?

Thank you,
Stephen
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Able to disable the unsafe attachment warning dialog?

Post by Sasha - Tracker Dev Team »

Hello Stephen,

Please refer to my previous question. Can you reproduce this with the same file in the End-User Editor. I mean the part where you check the box and the dialog appears again? Or does it behave normally - after you check the box once the dialog is not appearing anymore?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
stephen.starr
User
Posts: 123
Joined: Wed Mar 25, 2015 10:59 pm

Re: Able to disable the unsafe attachment warning dialog?

Post by stephen.starr »

I did respond to your question. It is the first sentence in my last reply. =)

Yes, it works in your editor. It does not work in ours.
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Able to disable the unsafe attachment warning dialog?

Post by Vasyl-Tracker Dev Team »

Hi Stephen.

You may try to set one property to prevent showing this dlg:

pdfCtl.Inst.Settings["Security.OpenEmbedPerm"].v = 1; // allow all

- do it once time, at initialization stage.

HTH
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.
stephen.starr
User
Posts: 123
Joined: Wed Mar 25, 2015 10:59 pm

Re: Able to disable the unsafe attachment warning dialog?

Post by stephen.starr »

Vasyl,

Unfortunately this did not work. I do see there is an 'e.beginModal' event fired though. Is there a way I can tell the dialog to continue from this event? The code below is from version 2 of the viewer, but I don't see an equivalent in v3.

case PXCVA_EventTypes.PXCVA_OnDisplayPrompt:
switch (upperName)
{
case ViewerConstants.Notifications.PromptsConfirmLaunchFile:
InternalSetProperty("Prompts.ConfirmLaunchFile.UserChoice", "Yes");
break;

Thank you for your help,
Stephen
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Able to disable the unsafe attachment warning dialog?  SOLVED

Post by Vasyl-Tracker Dev Team »

I checked the:

pdfCtl.Inst.Settings["Security.OpenEmbedPerm"].v = 1; // C#

- it working well for me. Please be sure that you correctly translated my code-sample to you programming language..
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.
stephen.starr
User
Posts: 123
Joined: Wed Mar 25, 2015 10:59 pm

Re: Able to disable the unsafe attachment warning dialog?

Post by stephen.starr »

Vasyl,

Thank you, I got it to work. It wasn't the syntax, apparently it matters where you set this. I initially set it when I first initialized my singleton viewer instance object. This didn't work.

I moved the code to my viewer object constructor and it works there.

Thanks again. I appreciate the help,
Stephen
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Able to disable the unsafe attachment warning dialog?

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply