Compare Docs : Operation Restrictions ?  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

Compare Docs : Operation Restrictions ?

Post by zarkogajic »

Hi Support,

This is an extension/override of https://forum.pdf-xchange.com/viewtopic.php?t=38922

What needs to be set to "allowed" using the needed combination of PXC_RequestObj / PXC_RequestOper so that Document Compare dialog does not say "Operation Insert Pages is not permitted for this document"?

Here's what I'm up to:

1. I'm opening documents without any security set (on document level) - they are not protected in any way.
2. To make them read-only in PXVControl I'm using SetRestrictedPermissions(PermF_All - PermF_Copy) *after* OpenDocumentFromXXX.

This obviously denies "inserting pages" (or any document changing operation). All works as expected.

Now, I'd want to temporary enable "insert pages" to be able to run document comparison - but am not sure what needs to be set (taking into account [1] and [2]) using SetOperationRestriction for this to happen...

I've tried

SetOperationRestriction(Perm_ObjPage, Perm_OperCreate, false)
SetOperationRestriction(Perm_ObjDoc, Perm_OperInsert, false)
...

Nothing I tried via SetOperationRestriction does the job or allowing "Insert Pages" for Document Comparison.


-žarko
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Compare Docs : Operation Restrictions ?

Post by Vasyl-Tracker Dev Team »

You need to remove the PrivPermF_DocAssembly too.
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: Compare Docs : Operation Restrictions ?  SOLVED

Post by zarkogajic »

Hi Vasyl,

Thanks, will try...


-žarko
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Compare Docs : Operation Restrictions ?

Post by Tracker Supp-Stefan »

:)
khho
User
Posts: 34
Joined: Fri Mar 11, 2022 11:02 am

Re: Compare Docs : Operation Restrictions ?

Post by khho »

zarkogajic wrote: Wed Jun 08, 2022 12:35 pm 1. I'm opening documents without any security set (on document level) - they are not protected in any way.
2. To make them read-only in PXVControl I'm using SetRestrictedPermissions(PermF_All - PermF_Copy) *after* OpenDocumentFromXXX.
Hi -žarko,
how do you use SetRestrictedPermissions(PermF_All - PermF_Copy) in detail?
Does "PermF_All - PermF_Copy" mean all PXC_PermsFlags from PermF_All to PermF_Copy?

kkho
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Compare Docs : Operation Restrictions ?

Post by zarkogajic »

HI,

Check this

https://forum.pdf-xchange.com/viewtopic.php?p=157676#p157676

In my case, "PermF_All - PermF_Copy", means: restrict anything except copy operation: "PermF_All & ~(PermF_Copy)"

-žarko
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Compare Docs : Operation Restrictions ?

Post by Tracker Supp-Stefan »

Hello zarkogajic,

Many thanks once again for your help!

Kind regards,
Stefan
khho
User
Posts: 34
Joined: Fri Mar 11, 2022 11:02 am

Re: Compare Docs : Operation Restrictions ?

Post by khho »

zarkogajic wrote: Thu Nov 24, 2022 5:10 pm HI,

Check this

https://forum.pdf-xchange.com/viewtopic.php?p=157676#p157676

In my case, "PermF_All - PermF_Copy", means: restrict anything except copy operation: "PermF_All & ~(PermF_Copy)"

-žarko
After working on a few other things, i'm coming back to this one...
I still do not understand the whole thing, but with your hints it's getting clearer.

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

Compare Docs : Operation Restrictions ?

Post by Dimitar - Tracker Supp »

:)
Post Reply