DocumentPermissions Class

Provides information about which operations to a PdfDocument that are allowed by the document author.

public class DocumentPermissions
Namespace
PdfToSvg
Package
PdfToSvg.NET (since v0.7.0)
Inheritance
System.Object PdfToSvg.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 pageNo = 1;

    foreach (var page in doc.Pages)
    {
        page.SaveAsSvg($"output-{pageNo++}.svg");
    }
}

Properties

AllowAnnotationsAllow the user to add or modify annotations.
AllowAssembleDocumentAllow modifying the document e.g. by addding, rotating or removing pages.
AllowExtractAccessibilityAllow extracting content for accessibility purposes.
AllowExtractContentAllows copying or extracting content from the document.
AllowFillFormAllow the user to fill in forms.
AllowModifyContentAllows the user to modify the document.
AllowPrintFullQualityAllows the user to print the document at full resolution.
AllowPrintLowQualityAllows the user to print the document, possibly at a lower resolution.
HasOwnerPermissionIndicates whether the user has full permission to the document, by opening the document using the document owner password.

See Also

PdfToSvg Namespace