The following code snippet shows how to protect the output PDF document:
withgv.Viewer("sample.docx")asviewer:# Specify the security settings.security=gvo.Security()security.document_open_password="o123"security.permissions_password="p123"security.permissions=gvo.Permissions.ALLOW_ALL&~gvo.Permissions.DENY_PRINTING# Create a PDF file.pdf_options=gvo.PdfViewOptions()# Apply the security settingspdf_options.security=securityviewer.view(pdf_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.