Security class
Leave feedback
On this page
The PDF document security options.
For details, see the documentation.
The Security type exposes the following members:
| Property | Description |
|---|---|
| document_open_password | The password required to open the PDF document. |
| permissions | The PDF document permissions such as printing, modification and data extraction. |
| permissions_password | The password required to change permission settings. |
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import PdfViewOptions, Security, Permissions
with Viewer("sample.docx") as viewer:
security = Security()
security.document_open_password = "o123"
security.permissions_password = "p123"
security.permissions = Permissions.ALLOW_ALL & ~Permissions.DENY_PRINTING
pdf_options = PdfViewOptions("protected_document.pdf")
pdf_options.security = security
viewer.view(pdf_options)
Task guides that use Security:
- module
groupdocs.viewer.options
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.