XML API - pdx:watermarkPdf
- 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:watermarkPdf
Inserts a watermark into a PDF document.
Note
You are reading the XML API documentation. For the PHP API method please go to watermarkPdf.
Description
Element definition
This element allows you to insert a watermark image or text in a PDF document.
Attributes and sub-elements
src
Path to the PDF document.
target
Path to the resulting watermarked document.
type
Watermark type: 'text' or 'image'.
options
The possible keys and values are (required options are shown with yellow background):
key | Description |
---|---|
annotations | Import annotations (links, comments and others). |
If type is 'image':
Key | Description |
---|---|
image | Path to the watermark image. |
positionX | X-asis position (page center as default). |
positionY | Y-asis position (page center as default). |
opacity | Decimal number between 0 and 1(optional), if not set defaults to 0.5. |
If type is 'text':
Key | Description |
---|---|
text | The string of text used for watermarking. |
positionX | X-asis position (page center as default). |
positionY | Y-asis position (page center as default). |
opacity | Decimal number between 0 and 1(optional), if not set defaults to 0.5. |
font | The font-family. It must be installed in the OS. |
size | Font size. |
Code samples
Example #1
config.xml
content.xml
settings.xml
PHP code