---
title: "DocumentPrivilege"
url: "https://reference.aspose.com/pdf/python-net/aspose.pdf.facades/documentprivilege/"
product: "Aspose.PDF for Python via .NET API Reference"
description: "Represents the privileges for accessing Pdf file. Refer to[PdfFileSecurity](/pdf/python-net/aspose.pdf.facades/pdffilesecurity/). There are 4 ways using this class: 1.Using predefined privilege directly. 2.Based on a predefined privilege and change some specifical permissions. 3.Based on a predefined privilege and change some specifical Adobe Professional permissions combination. 4.Mixes the way2 and way3."
---


## DocumentPrivilege class

Represents the privileges for accessing Pdf file. Refer to[PdfFileSecurity](/pdf/python-net/aspose.pdf.facades/pdffilesecurity/).<br/>             There are 4 ways using this class:<br/>             1.Using predefined privilege directly.<br/>             2.Based on a predefined privilege and change some specifical permissions.<br/>             3.Based on a predefined privilege and change some specifical Adobe Professional permissions combination.<br/>             4.Mixes the way2 and way3.

The DocumentPrivilege type exposes the following members:
## Properties
| Name | Description |
| :- | :- |
|allow_print|Sets the permission which allow print or not. <br/>            true is allow and false is forbidden.|
|allow_degraded_printing|Sets the permission which allow degraded printing or not. <br/>            true is allow and false is forbidden.|
|allow_modify_contents|Sets the permission which allow modify contents or not. <br/>            true is allow and false is forbidden.|
|allow_copy|Sets the permission which allow copy or not. <br/>            true is allow and false is forbidden.|
|allow_modify_annotations|Sets the permission which allow modify annotations or not. <br/>            true is allow and false is forbidden.|
|allow_fill_in|Sets the permission which allow fill in forms or not. <br/>            true is allow and false is forbidden.|
|allow_screen_readers|Sets the permission which allow screen readers or not. <br/>            true is allow and false is forbidden.|
|allow_assembly|Sets the permission which allow assembly or not. <br/>            true is allow and false is forbidden.|
|degraded_printing|Allows degraded printing.|
|print|Allows printing file.|
|modify_contents|Allows modifying file.|
|copy|Allows copying file.|
|modify_annotations|Allows modifying annotations of file.|
|fill_in|Allows filling forms in file.|
|screen_readers|Allows to reader on screen only.|
|assembly|Allows assemblying file.|
|allow_all|All allowed.|
|forbid_all|All Forbidded.|
## Methods
| Name | Description |
| :- | :- |
|compare_to(obj)|Compares two [DocumentPrivilege](/pdf/python-net/aspose.pdf.facades/documentprivilege/) objects.|

### See Also

* namespace [aspose.pdf.facades](/pdf/python-net/aspose.pdf.facades/)
* assembly [Aspose.PDF](/pdf/python-net/)

