XML API - pdx:protectDocx
- addBackgroundImage
- addFooter
- addHeader
- addLineNumbering
- addMacroFromDoc
- addPageBorders
- addProperties
- addSection
- createCharacterStyle
- createListStyle
- createParagraphStyle
- docxSettings
- importHeadersAndFooters
- importListStyle
- importStyles
- modifyPageLayout
- parseStyles
- removeFooters
- removeHeaders
- setBackgroundColor
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- addBookmark
- addBreak
- addChart
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOnlineVideo
- addPageNumber
- addShape
- addSimpleField
- addStructuredDocumentTag
- addTable
- addTableContents
- addTableFigures
- addText
- addTextBox
- addWordML
- embedHTML
- clearBlocks
- deleteBlock
- modifyInputFields
- processTemplate
- rawSearchAndReplace
- removeTemplateVariable
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- setTemplateBlockSymbol
pdx:protectDocx
Password protects the contents of a Word document.
Note
You are reading the XML API documentation. For the PHP API method please go to protectDocx.
Element definition
This element allows to password protect a Word document. One may protect in read only mode or allow the final user to modify comments or form elements.
Notice that this element does not encrypt the contents of the Word document, only protects them from unauthorized modifications. This element is not secure and can be easily overridden by an experienced user.
src
Path to the word document you want to protect.
target
Path to the resulting protected document.
password
The password should be a string of 15 or less characters. If you introduce a password with more than 15 characters it will be automatically truncated.
type
Available protection types: readOnly (allows no editing. This is the default value), comments (allows the edition of comments), trackedChanges (allows editing with revision tracking) and forms (allows the edition of form fields).