PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > PDFENCRYPT command
PDFENCRYPT command

Protects an existing PDF document.

The AES 256 encryption is used.

 

Syntax

 

CHGVAR

VAR(&CMD) VALUE('PDFENCRYPT')

CHGVAR

VAR(&PARM1) VALUE('
File="
PDF file name"
;OwnerPWD="Owner password"
[;UserPWD="User password"]
[;EnablePrint=
True / False ]
[;EnableCopy= True / False]
[;EnableEdit= True / False]
[;EnableNotes= True / False]
')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

&PARM2 &RESULT)

 

 Parameters

 

Parameters

 

Parm1
or
Parm2

File : Path to the existing PDF file to protect.

 

OwnerPWD: Owner password (mandatory). With this password, the owner will be able to do any operation on the document.

 

UserPWD: User password (Optional). If this password is set, it will be required when the document is opened.

 

EnablePrint: Authorize to print the document. Optional.

 

EnableCopy: Authorize to copy the document. Optional.

 

EnableEdit: Authorize to modify the document. Optional.

 

EnableNotes: Authorize the user to add notes. Optional.

 

 

 

 

 

Example

 

To protect a document by adding owner and user passwords, you can use the following command. Please note that printing is allowed. 

 

  LNCCMD     CMD(PDFENCRYPT) +                             

               PARM1('FILE="C:\temp\+

               res.pdf";OwnerPWD="ced";UserPWD="aura";E+

               nablePrint=true')

 

Opening the PDF will require a password (UserPWD):

 

The PDF will also have the following properties: