Please enable JavaScript to view this site.

Navigation: Developer Information > Using the Windows registry

Controlling Encryption Options

Scroll Prev Top Next More

To set the security permissions, you can create a DWORD value named "security permissions" at any of the standard registry locations.

 

The DWORD value must be named "security permissions", and the value is defined by Adobe in the PDF specification available from: https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf

 

The following table from this specification defines the privileges:

 

Bit Position

Meaning

1-2

Reserved; must be 0

3

Print document

4

Modify contents of document (other than text annotations and interactive form fields

5

Copy text and graphics from document

6

Add or modify text annotations and interactive form fields

7-8

Reserved; must be 1

9

Fill in existing form fields

10

Extract text and graphics for Accessibility

11

Assemble the document

12

Allow high resolution printing

13-32

Reserved; must be 1

 

The default value is 0xfffffffc. For example, to create a PDF document that doesn't allow printing you need to set bit position 3 to a 0 so you would set the "security permissions" to 0xfffffff8.

 

The following table lists common combinations of security permissions:

Disable printing            0xfffffff8
Disable copying             0xffffffec
Disable modifying            0xfffffff4
Disable printing & copying       0xffffffe8
Disable printing & modifying      0xfffffff0
Disable copying & modifying       0xffffffe4
Disable printing & copying & modifying 0xffffffe0

 

You can set passwords by creating String values named "user password" or "master password" to password protect documents. The passwords are only used if encryption is enabled in the "file options" setting. All registry values are deleted after each document unless the persistent value is set.

 

The security permissions and passwords are only valid for Win2PDF Pro.