Hom > Products > Windows > Encrypt PDF

Encrypt PDF COM/DLL User manual


Encrypt PDF software is a very flexible and powerful program, Encrypt PDF software allows you to encrypt (using standard 40-bit or 128-bit supported by Acrobat Reader 5.0 and up) existing PDFs, set permissions, add user and owner password. For example you can encrypt a PDF without to allow to print it. The button to print the file will be disabled in Acrobat Reader application, you also can encrypt a PDF allowing the user to read it only if he know the correct password.

Limitations in the trial version
Popup a message box in the trial version.
Encrypt only first half of pages in the PDF file.


long WINAPI veryEncryptPDF(const char * inFileName, const char *outFileName, long EnctyptLen, long permission, const char *OwnerPassword, const char *UserPassword)

This function can be used to encrypt your PDF files with various options.


inFileName Input PDF filename
outFileName Output PDF filename
EnctyptLen The encryption level, MUST equal 40 or 128
Permission Set permission to a pdf document; include printing, copying and changing and enable form fields.
0: no printing, no copying and no changing
4: allow printing
16: allow copying
8: allow changing
32: allow AcroFormFields
For example, if you want allow printing, copying and changing, the permission value should be 4+16+8 = 28
OwnerPassword Owner password
UserPassword User password

Return value:
0: Failed
1: Succeed

BOOL WINAPI veryTestEncryptedPDF(const char * inFileName, const char *OwnerPassword, const char *UserPassword)

       Test the encrypted PDF file with special owner/user passwords.


InFileName Input PDF filename for test
OwnerPassword Owner Password of your input PDF file
UserPassword User Password of your input PDF file

Return value:
0: Owner password or user password is wrong.
1: Owner password or user password is right.

Helpful documentations:
Encrypting PDF files
User Access Permissions
Encrypt PDF Command Line
Encrypt PDF SDK Functions

There are many other software have the encryption function, such as Image2PDF, PDFcamp Printer, HTML Converter, AutoCAD DWG and DXF To PDF Converter, Free Text To PDF Converter. They use the same in common algorithm RC4 or MD5 and allow to create owner password and user password to protect PDF file. For the usage, please visit www.verypdf.com.