Search Results for

    Show / Hide Table of Contents

    Class PdfEditSecurity

    Controls PDF editing permissions for password-protected documents. Defines what changes users can make without the owner password.

    // Prevent ALL editing:
    pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.NoEdit;
    pdf.SecuritySettings.UserPassword = "read123";
    pdf.SecuritySettings.OwnerPassword = "admin456";
    
    // Allow only page management:
    pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.EditPages;
    
    // Allow full editing:
    pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.EditAll;

    Users with owner password always have full access

    Actual restrictions depend on PDF viewer compliance

    See: https://ironpdf.com/how-to/pdf-security/

    Inheritance
    System.Object
    PdfEditSecurity
    Namespace: IronPdf.Security
    Assembly: IronPdf.dll
    Syntax
    public sealed class PdfEditSecurity : Enum

    The PdfEditSecurity enumeration in IronPDF controls what edits an owner-password holder can perform on an encrypted PDF.

    Part of the IronPdf.Security namespace, the 3 members are NoEdit, EditPages, and EditAll, covering the restriction tiers most workflows need. Assign a member to PdfSecuritySettings.AllowUserEdits before saving the document.

    See Set PDF Passwords and Permissions for end-to-end C# usage.

    Fields

    EditAll

    Full editing allowed (except security settings). Users can modify content, add annotations, fill forms.

    // Collaborative document with tracking:
    pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.EditAll;
    pdf.SecuritySettings.UserPassword = "team123";
    // Team can edit, but can't remove password
    Declaration
    public const PdfEditSecurity EditAll
    Field Value
    Type Description
    PdfEditSecurity

    EditPages

    Limited editing: page organization only. Users can rotate, delete, reorder pages but cannot edit content.

    // Allow page management for presentations:
    pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.EditPages;
    // Users can customize page order for their needs
    Declaration
    public const PdfEditSecurity EditPages
    Field Value
    Type Description
    PdfEditSecurity

    NoEdit

    No editing allowed. Document is read-only without owner password. Users cannot modify content, add annotations, or fill forms.

    // Lock document completely:
    pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.NoEdit;
    pdf.SecuritySettings.UserPassword = "viewer";
    // Result: Users can only view/print
    Declaration
    public const PdfEditSecurity NoEdit
    Field Value
    Type Description
    PdfEditSecurity

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget