Snapshot tool and PXC_PermsFlags PermF_All  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
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Snapshot tool and PXC_PermsFlags PermF_All

Post by zarkogajic »

Hi Support,

I'm opening documents with "highest restrictions" using PermF_All for SecPermMask for CreateOpenDocParams.

This nicely disables any editing and even copying selected text via the "Select Text" tool.

Also, when removing all disabled menu items from the Pages_View context menu, this is how the menu looks:

image.png
image.png (7.74 KiB) Viewed 1220 times

I can activate the, for example, "Select Text" tool - and I can select some text, but copying of text will be disabled.

This is how I want it. (Actually I might also remove the "Select Text" tool from that menu, but that's a different story)

I have troubles with the Snapshot tool -> it can be selected and it will appear to work but the snapshot will not be taken (also no sound).

Is there a way to enable the snapshot tool - some PXC_PermsFlags perhaps?

So: enable snapshots but disable text copying?.


-žarko
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Snapshot tool and PXC_PermsFlags PermF_All

Post by TrackerSupp-Daniel »

Hello, zarkogajic

Thank you for the inquiry, Unfortunatley, if the document restricts content copying, that includes both text AND image based extraction. As an application which respects document security, we cannot simply make an exception, or allow an exception to be made using our software, as such, no this cannot, should not, and will not be done.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Snapshot tool and PXC_PermsFlags PermF_All  SOLVED

Post by zarkogajic »

Hi,

Note that the document does not restrict anything. I am faking restrictions via "SecPermMask".

But, I understand what you are saying.

-žarko
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Snapshot tool and PXC_PermsFlags PermF_All

Post by TrackerSupp-Daniel »

Hello, zarkogajic

Sorry about that, I misunderstood when you said "opening documents with highest restrictions" as meaning the files themselves were restricted. Ill run this by the dev team again to see if there is a way they can think of to get this done.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Snapshot tool and PXC_PermsFlags PermF_All

Post by Vasyl-Tracker Dev Team »

Hi Zarko.

If you removed the Perm_OperCopy by using the doc.SetRestrictedPermissions(Perm_All) then it disables the whole copy-feature for this doc, without any exclusion for Snapshot tool. According to PDF-Spec we haven't different CopyPermission-flags, one for text and second for graphic, but just single and common Perm_OperCopy flag...

Potentially exists other way: you may try to override IUIX_CmdHandler and its OnGetItemState for "cmd.copy", "cmd.tool.selectText.copyAsRich".
Inside it you can get a corresponding docView/doc(from pOwner arg, via GetDocViewFromUIObj) to be able to return the proper cmd-state...

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.
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Snapshot tool and PXC_PermsFlags PermF_All

Post by zarkogajic »

Hi Vasyl,

Thanks, all clear.

User avatar
Dimitar - Tracker Supp
Site Admin
Posts: 1778
Joined: Mon Jan 15, 2018 9:01 am

Snapshot tool and PXC_PermsFlags PermF_All

Post by Dimitar - Tracker Supp »

:)
Post Reply