How do I remove Acrobat's Rights Enable info from PDF?

51 views
Skip to first unread message

Support

unread,
May 23, 2012, 5:13:09 PM5/23/12
to pdfne...@googlegroups.com
Q: How do I remove Acrobat's Rights Enable info from PDF?
 
My PDF is not secured with a password it just has the extended rights in reader to allow saving of forms 7 annots.
 
I'm pretty sure it's something at cos level that need to be ripped?
 
-----------
A:
 

You could use the following lines:

 

// Remove Adobe's Rights enable dictionary

doc.GetRoot().Erase("Perm");

Obj view_prefs = doc.GetRoot().FindObj("ViewerPreferences");

if (view_prefs != null) view_prefs.Erase("Rights");

...

doc.Save(...)

Support

unread,
May 23, 2012, 6:02:29 PM5/23/12
to pdfne...@googlegroups.com

Working now just a minor typo in your code needed to be

 

doc.GetRoot().Erase("Perms");

Reply all
Reply to author
Forward
0 new messages