Search Results for

    Show / Hide Table of Contents

    Class PdfSecuritySettings

    A class defining user security settings for a PDF document.

    Allows the developer to control user access passwords, encryption, and also who may edit, print and copy content from the PDF document

    Implemented in SecuritySettings.

    Inheritance
    System.Object
    PdfClientAccessor
    PdfSecuritySettings
    Namespace: IronPdf.Security
    Assembly: IronPdf.dll
    Syntax
    public class PdfSecuritySettings : PdfClientAccessor

    Properties

    AllowUserAnnotations

    Gets or sets the permissions for users to annotate the PDF document with comments.

    If AllowUserAnnotations is set false, the OwnerPassword must be set for the security measure to take effect.

    Declaration
    public bool AllowUserAnnotations { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if users may annotate the PDF document, otherwise false.

    AllowUserCopyPasteContent

    Gets or sets the permissions for users to extract or 'copy & paste' content (text and images) from the PDF document.

    If AllowUserCopyPasteContent is set false, the OwnerPassword must also be set for the security measure to take effect.

    Declaration
    public bool AllowUserCopyPasteContent { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if users may 'copy and paste' content out of the PDF otherwise, false.

    AllowUserCopyPasteContentForAccessibility

    Gets or sets the permissions for users to extract or 'copy & paste' content (text and images) from the PDF document for accessibility.

    Declaration
    public bool AllowUserCopyPasteContentForAccessibility { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if users may 'copy and paste' content out of the PDF otherwise, false.

    AllowUserEdits

    Gets or sets the permissions for users edit the PDF document. The features to edit the document depends entirely on the PDF client software used by the end user.

    If editing rights are restricted, then the OwnerPassword must be set for the security measure to take effect.

    Declaration
    public PdfEditSecurity AllowUserEdits { get; set; }
    Property Value
    Type Description
    PdfEditSecurity

    The PdfEditSecurity value for user edit security.

    AllowUserFormData

    Gets or sets the permissions for users to fill-in (enter data into) forms in the PDF document.

    If AllowUserFormData is set false, the OwnerPassword must be set for the security measure to take effect.

    Note. If you want to make the form readonly in Adobe Acrobat Reader please call MakePdfDocumentReadOnly(String) method or set AllowUserEdits to NoEdit and set OwnerPassword.

    Declaration
    public bool AllowUserFormData { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if users may annotate the PDF document, otherwise false. Setting AllowUserFormData true will also enable annotations.

    AllowUserPrinting

    Gets or sets the permissions for users to print the PDF document.

    If print rights are restricted, then the OwnerPassword must be set for the security measure to take effect.

    Declaration
    public PdfPrintSecurity AllowUserPrinting { get; set; }
    Property Value
    Type Description
    PdfPrintSecurity

    The PdfPrintSecurity value for user printing.

    OwnerPassword

    Sets the owner password and enables 128Bit encryption of PDF content. An owner password is one used to enable and disable all other security settings.

    OwnerPassword must be set to a non empty string value for AllowUserCopyPasteContent, AllowUserAnnotations, AllowUserFormData,s AllowUserPrinting and AllowUserEdits to be restricted.

    Declaration
    public string OwnerPassword { get; set; }
    Property Value
    Type Description
    System.String

    UserPassword

    Sets the user password and enables 128Bit encryption of PDF content .

    A user password is a password that each user must enter to open or print the PDF document.

    Declaration
    public string UserPassword { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    MakePdfDocumentReadOnly(String)

    Makes this PDF document read only such that:

    Content is encrypted at 128 bit. Copy and paste of content is disallowed. Annotations and form editing are disabled.

    Declaration
    public void MakePdfDocumentReadOnly(string OwnerPassword)
    Parameters
    Type Name Description
    System.String OwnerPassword

    The owner password for the PDF. A string for owner password is required to enable PDF encryption and all document security options.

    RemovePasswordsAndEncryption()

    Removes all user and owner password security for a PDF document. Also disables content encryption.

    Content is encrypted at 128 bit. Copy and paste of content is disallowed. Annotations and form editing are disabled.

    Declaration
    public void RemovePasswordsAndEncryption()
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    Want to deploy IronPDF to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronPDF free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.