I'm trying to disable "Save As" (and "Save Copy As" commands) *per* document.
Using:
Code: Select all
//piece from FullDemo
ICab openCab = pdfCtl.Inst.CreateOpenDocParams();
openCab.Root.SetInt("SecPermMask", (int)PDFXEdit.PXC_PermsFlags.PermF_All);
pdfCtl.OpenDocFromPath(tSrcToOpen.Text,openCab);
Printing also gets disabled.
If, for example, I use "PermF_All - PermF_Print" for "SecPerMask" -> all editing is disabled, but printing is enabled - as expected.
However, the "Save As" and "Save Copy As" are enabled in UI - even if "PermF_SaveAs" should be covered by "PermF_All".
I've also tried with (after opening the document):
Code: Select all
pdfCtl.Doc.CoreDoc.SetOperationRestriction(Perm_ObjDoc, Perm_OperUIsave, true);
pdfCtl.Doc.CoreDoc.SetOperationRestriction(Perm_ObjDoc, Perm_OperFullSave, true);
Question: is this a bug and (if not) how to disable saving ?
p.s.
No, I do not want to disable/hide/make_offline the "saveAs" command for the entire Instance, as in: https://forum.pdf-xchange.com/viewtopic.php?f=66&t=32598&p=133593
I need to disable saving per document.
p.s.2
Yes, using the latest version 9.1.356.
-žarko