Reader Enabled Documents Documents with specified user rights needs to be handled especially

Introduction

Adobe offers different services which enable hidden feature in Adobe Reader by passing special digital signatures to a document. These signatures e.g. enables the reader application to save a filled form or add annotations or signatures to the document without the needs of e.g. Adobe Acrobat.

By modifying such "reader enabled" documents it is possible to invalid the signature that activates these hidden features. If this is the case the reader application may block the usage of the document completely and will display an annoying error message.

The Core component allows you to check for a "rights enabled" document and allows you to remove these rights.

Check for Usage Rights

The SetaPDF-Core component comes with a helper class that allows you to check if a document is "rights enable": 

PHP
$document = \SetaPDF_Core_Document::loadByFilename('rights-enable.pdf');

$permissions = $document->getCatalog()->getPermissions();
var_dump($permissions->hasUsageRights());

Remove Usage Rights

If you need to do modifications on a document, which will destroy the usage rights, it is also possible to remove them by the Permissions class: 

PHP
$document = \SetaPDF_Core_Document::loadByFilename('rights-enable.pdf');

$permissions = $document->getCatalog()->getPermissions();
$permissions->removeUsageRights();