Debenu Quick PDF logo


Security and Signatures


This function adds the specified security settings to the selected document.

From Quick PDF Library 8.11, the actual encryption of the document is delayed until the document is saved so this function can be called at any time, even before further content is added to the document.



function TDebenuPDFLibrary1511.Encrypt(Owner, User: WideString; Strength, 
  Permissions: Integer): Integer;


Function DebenuPDFLibrary1511.PDFLibrary::Encrypt(Owner As String, User As String,
  Strength As Long, Permissions As Long) As Long


int DPLEncrypt(int InstanceID, wchar_t * Owner, wchar_t * User, int Strength,
  int Permissions)


Owner The owner or master password for the document
User The user password for the document
Strength The strength of encryption to use:
0 = 40-bit encryption
1 = 128-bit RC4 encryption
2 = 128-bit AES encryption (requires Acrobat 7 or later)
3 = 256-bit AES encryption (requires Acrobat 9 or later)
4 = 256-bit AES encryption (requires Acrobat X or later)
Permissions A value created with the EncodePermissions function

Return values

0 The document could not be encrypted. Use the LastErrorCode function to determine the reason for failure.
1 The document was encrypted successfully

Copyright © 2014 Debenu. All rights reserved. AboutContactBlogNewsletterSupport