protectPDF
- addBackgroundImage
- addFooter
- addHeader
- addLineNumbering
- addPageBorders
- addProperties
- addSection
- createDocx
- createCharacterStyle
- createListStyle
- createParagraphStyle
- createTableStyle
- docxSettings
- embedFont
- importHeadersAndFooters
- importStyles
- modifyPageLayout
- removeFooters
- removeHeaders
- setBackgroundColor
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- setRTL
- addBibliography
- addBookmark
- addBreak
- addChart
- addCitation
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOLE
- addPageNumber
- addShape
- addSimpleField
- addSource
- addStructuredDocumentTag
- addTable
- addTableContents
- addText
- addTextBox
- addWordML
- embedHTML
- clearBlocks
- deleteTemplateBlock
- getTemplateVariables
- getTemplateVariablesType
- modifyInputFields
- modifyMergeFields
- processTemplate
- removeTemplateVariable
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- tickCheckbox
protectPDF
PREMIUM
BASIC / ADVANCED
Password protects the contents of a PDF document.
Description
public protectPDF (string $source, string $target, array $options)
This method allows to password protect a PDF document. One may protect the PDF from being printed, copied, etcetera.
Notice that this method does not encrypt the contents of the PDF document. This method is not secure and can be easily overriden by an experienced user.
You may find a detailed description of this package in the cryptophpdocx section of the API documentation.
Parameters
source
Path to the PDF document you want to protect.
target
Path to the resulting protected PDF document.
options
The possible keys and values are (required options are shown with yellow background):
Key | Type | Description |
---|---|---|
permissionsBlocked | array |
|
passwordOwner | string | String to allow full access to the PDF file. |
Return values
Void.