OwnerPassword
IPDFDocument3 :: General document methods

See Also Example
Collapse All

This property gets or sets a password for edit-protection of the PDF document.

Syntax

BSTR OwnerPassword { get; set; }
Value
Password string

Remarks

OwnerPassword contains a password for the current PDF document. The password is required to edit an encrypted PDF file.

Equivalent in new interface: IPDFDocument4::OwnerPassword.

Example

Protecting a PDF Document with Passwords

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.UserPassword := 'userpassword';
PDF.OwnerPassword := 'superpassword';
PDF.BeginDoc;
{ fill document's content here }
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->UserPassword = "userpassword";
PDF->OwnerPassword = "superpassword";
PDF->BeginDoc();
// fill document's content here
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.UserPassword = "userpassword";
PDF.OwnerPassword = "superpassword";
PDF.BeginDoc();
// fill document's content here
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.UserPassword = "userpassword"
PDF.OwnerPassword = "superpassword"
PDF.BeginDoc
' fill document's content here
PDF.EndDoc

See Also

Reference