WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Protects and encrypts a PDF document with a password. A new encrypted PDF document with the specified password is created. This password will be requested when opening the PDF file.
IF NOT PDFPassword("clear.pdf", "encrypt.pdf", iProtectionDefault, "password") THEN
<Result> = PDFPassword(<Source PDF file> , <Result PDF file> , <Options> , <Password> [, <Protection password>])
<Result>: Boolean
  • True if the protection is applied,
  • False if a problem occurs. ErrorInfo returns the details of the error.
<Source PDF file>: Character string
Name and full path of the PDF file to protect.
Remark: This PDF file must not already be password-protected.
<Result PDF file>: Character string
Name and full path of the protected PDF file.
<Options>: Integer constant (or combination of constants)
Available protection options:
iProtectionCommentPrevents from adding or editing comments.
iProtectionDefaultProtection by default: the pdf file is encrypted with the password without any additional protection.
iProtectionModificationThe content of the PDF file cannot be modified.
iProtectionPrintingThe PDF file cannot be printed.
iProtectionSelectionThe content of the PDF file cannot be copied or extracted from the file.
<Password>: Character string
Password used to open the PDF file. This password allows you to decrypt the PDF file to read it while respecting the permissions set in the <Options> parameter.
This password cannot contain Unicode characters.
<Protection password>: Optional character string
Password used to allow the modification of the protection options for the PDF file. If this password is used, the protection options specified in the <Options> parameters will not be taken into account.
This password cannot contain Unicode characters.
Business / UI classification: Business Logic
Component: wd280wdpdf.dll
Minimum version required
  • Version 24
This page is also available for…
Click [Add] to post a comment