XML API - pdx:protectPDF
- 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:protectPDF
Password protects the contents of a PDF document.
Note
You are reading the XML API documentation. For the PHP API method please go to protectPDF.
Element definition
This element allows to password protect a PDF document. One may protect the PDF from being printed, copied, etcetera
Notice that this element does not encrypt the contents of the PDF document. This element is not secure and can be easily overridden by an experienced user.
You may find a detailed description of this package in the cryptophpdocx section of the API documentation.
src
Path to the PDF document you want to protect.
target
Path to the resulting protected PDF document.
password
The password.
options
The possible keys and values are (required options are shown with yellow background):
Key | Description |
---|---|
annotations | Import annotations (links, comments and others). False as default. |
permissionsBlocked |
|
passwordOwner | String to allow full access to the PDF file. |
Example #1
config.xml
content.xml
settings.xml
PHP code