How to suppres 'rights enabled' message in Adobe Reader 8?


Some of PDF documents that I edit using PDFNet are generationg the
foloowing message:

"This document contained certain rights to enable special features in
Adobe Reader. The document has been changed since it was created and
these rights are no longer valid. Please contact the author of the
original version of this document."

Is there a way to suppress this message?


You can get rid of this error message in Acrobat if you use the
following lines just before saving the modified document:

// In C#
Obj prefs = pdfdoc.GetViewPrefs().GetSDFObj();
if (prefs != null) prefs.Erase("Rights");

There is actually nothing wrong with the document and the error is
related to one of Adobe's schemes to keep customers locked in their
solutions. You can find more information of this topic in PDFNet
Knowledge Base [; and search
for "rights enable"].

A small correction. A more reliable way to accomplish the same thing
is as follows:

// In C#
Obj view_prefs = pdfdoc.GetRoot().FindObj("ViewerPreferences");
if (view_prefs != null) view_prefs.Erase("Rights");

// In C++
if (Obj view_prefs = pdfdoc.GetRoot()->FindObj("ViewerPreferences"))