Skip to content

add "Restrict Editing" method to public API #1641

Open

Description

@nikristovski1

It would be useful to support Word's document protection features, such as Restrict Editing → No Changes (Read Only).

Currently, enabling document protection requires manually modifying the underlying Open XML contained within the DOCX file. This involves extracting the document package, updating word/settings.xml to add a w:documentProtection element, and then rebuilding the DOCX archive.

While this approach works, it requires low-level knowledge of the DOCX format and direct XML manipulation. A high-level API would make it significantly easier to create documents that can be viewed and printed but are protected against accidental modification.

Possible API examples:

document.protection.read_only = True

or

document.protection.restrict_editing()

This would provide a more convenient and discoverable way to configure document protection without requiring users to work directly with Open XML internals.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions