*ENCRYPT (PRTPAGE)


9.6A, PLBCMP GUI Only

*ENCRYPT={svarslit}

 

This advanced print control takes a comma separated list of fields as provided in the {svarslit} data string to specify parameters that allow PDF encryption to be used for the PDF output file. Each field is composed of a field identifier assigned using a '=' character followed by field data. The data <string> field data can be specified with or without double quote characters. The *ENCRYPT fields are optional.

 

The following *ENCRYPT fields are supported:

 

Where:

<string>
A user specified string that may or may not include double quote characters.

 

Fields:

O=<string> //Optional Owner password
When the owner password field is specified, this password encrypts the user password.
 
U=<string> //Optional User password
When the user password field is specified, a PDF reader will ask for input of this password.
 
P=<string> //Optional Permissions as a set of bits
This field specifies the permissions that are to be applied by a PDF reader. The <string> specified for the permissions is composed of decimal characters that represents a bit mask value. The permissions are defined as follows:

 

Permissions as Bit Mask:

 

Permissions = D7+D6+D5+D4+D3+D2+D1+D0

 

D0 - Reserved must be 0

D1 - Reserved must be 0

D2 - Allow document to be printed. Add a value of (4) to enable this permission.

D3 - Allow the contents of the PDF document to be modified. Add a value of (8) to enable this permission.

D4 - Allow text and graphics to be copied or extracted from the PDF document. Add a value of (16) to enable this permission.

D5 - Allow additions and modifications for document text annotations. Also, allow interactive form fields to be filled. In addition, if the D3 permission is enabled, allow form fields to be set, created, or modified. Add a value of (32) enable this permission.

D6 - Not used

D7 - Not used

 

 Where each 'Dn' represents the corresponding bit in the permissions byte bit mask value.

Note:

  1. Only one PRTPAGE *ENCRYPT can be executed to invoke encryption for the PDF output file. If a second is executed a S30 error occurs.

  2. All of the expected *ENCRYPT field settings must be included in the first and only PRTPAGE *ENCRYPT when executed.

  3. A S30 error with appropriate subcode is generated if the PRTPAGE *ENCRYPT is executed after the PDF data output has already been started. Therefore, if encryption is to be used, the *ENCRYPT control should be executed after the PRTOPEN and before print data has started.

Example:

     PRTPAGE Prt;*ENCRYPT="O=sunbelt,P=4,U=Bill"

 

 

See Also: List Controls (PRTPAGE), PRTPAGE



PL/B Language Reference