How do i know what is allowed with the PDF?
I found out these 2 functions but they are not documented on the site
GetSecurityData
and
GetSecurityHandler
Find out if document is protected for modification
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, 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.
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.
-
- User
- Posts: 83
- Joined: Wed Mar 25, 2015 10:15 am
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Find out if document is protected for modification
Hello Tom,
The correct method to use is this:
https://sdkhelp.pdf-xchange.com/vie ... Permission
And here's the code sample that would hopefully be enough for your cause:
Cheers,
Alex
The correct method to use is this:
https://sdkhelp.pdf-xchange.com/vie ... Permission
And here's the code sample that would hopefully be enough for your cause:
Code: Select all
private void checkDocumentSecurityToolStripMenuItem_Click(object sender, EventArgs e)
{
PDFXEdit.PXC_PermStatus ps = pdfCtl.Doc.CoreDoc.RequestPermission(PDFXEdit.PXC_RequestObj.Perm_ObjDoc, PDFXEdit.PXC_RequestOper.Perm_OperModify, System.IntPtr.Zero);
if (ps == PDFXEdit.PXC_PermStatus.Perm_ReqGranted)
MessageBox.Show("Granted");
else
MessageBox.Show("Denied");
}
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 83
- Joined: Wed Mar 25, 2015 10:15 am
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Find out if document is protected for modification
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 83
- Joined: Wed Mar 25, 2015 10:15 am
Re: Find out if document is protected for modification
whats the PXC_RequestOper constant for requesting the page extraction right?
once again the documentation not complete...
https://sdkhelp.pdf-xchange.com/vie ... equestOper
once again the documentation not complete...
https://sdkhelp.pdf-xchange.com/vie ... equestOper
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Find out if document is protected for modification
Hello Tom,
Well many enumeration values' names are self explanatory in many cases. Also these are taken for the PDF documentation. In this case the Perm_OperExport should be used as you are using the export pages feature (judging from your description). If you are using the Copy Pages feature then the Perm_OperCopy should be used. If you are moving pages then the Perm_OperDelete should be also checked as you are removing them from their original position in the document.
Cheers,
Alex
Well many enumeration values' names are self explanatory in many cases. Also these are taken for the PDF documentation. In this case the Perm_OperExport should be used as you are using the export pages feature (judging from your description). If you are using the Copy Pages feature then the Perm_OperCopy should be used. If you are moving pages then the Perm_OperDelete should be also checked as you are removing them from their original position in the document.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ