DocumentPermissions Class
Provides information about which operations to a PdfDocument that are allowed by the document author.
public class DocumentPermissions
Remarks
For encrypted PDF documents, there are two passwords, a user password and an owner password. The user password is needed to open the document, while the owner password can be used to get full access to the document.
If AllowExtractContent is false
, the document can only be converted by specifying the owner password in OpenOptions when the document is opened.
Converting a protected document
var openOptions = new OpenOptions { Password = "my owner password" }; using (var doc = PdfDocument.Open("input.pdf", openOptions)) { var pageIndex = 0; foreach (var page in doc.Pages) { page.SaveAsSvg($"output-{pageIndex++}.svg"); } }
Properties
AllowAnnotations | Allow the user to add or modify annotations. | |
AllowAssembleDocument | Allow modifying the document e.g. by addding, rotating or removing pages. | |
AllowExtractAccessibility | Allow extracting content for accessibility purposes. | |
AllowExtractContent | Allows copying or extracting content from the document. | |
AllowFillForm | Allow the user to fill in forms. | |
AllowModifyContent | Allows the user to modify the document. | |
AllowPrintFullQuality | Allows the user to print the document at full resolution. | |
AllowPrintLowQuality | Allows the user to print the document, possibly at a lower resolution. | |
HasOwnerPermission | Indicates whether the user has full permission to the document, by opening the document using the document owner password. |