Check for Adobe Policy Setting in PDF

25 views
Skip to first unread message

Support

unread,
Sep 5, 2012, 9:46:49 PM9/5/12
to pdfne...@googlegroups.com
Q:
We are trying to validate if a PDF document has Adobe policy settings enabled using the PDFTron API. Is there an API that we can use to detect the existence of a policy setting on a given PDF file?
 
-----------
A:

 

I am not exactly sure what you mean with 'Adobe policy settings', however in case you are looking how Acrobat Pro tags PDF (so that they can be manipulated in 'free' Reader), this info is stored as a signature in 'Perms' dictionary.

 

You can access the info as follows:

 

Obj p = pdfdoc.GetRoot().FindObj("Perms");

if (p != null) {

     // Check for the 'Rights' dict...

     Obj  rights = p.FindObj("UR");

     ...

    // Maybe erase p.Erase("UR");  etc.

}

 

Reply all
Reply to author
Forward
0 new messages