XML API - pdx:watermarkDocx
- 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:watermarkDocx
Inserts a watermark into a Word document.
Note
You are reading the XML API documentation. For the PHP API method please go to watermarkDocx.
Description
Element definition
This element allows you to insert a watermark image or text in a Word document.
Attributes and sub-elements
src
Path to the Word document.
target
Path to the resulting watermarked document.
type
Watermark type: 'text' or 'image'.
section
Section number.
options
The possible keys and values are (required options are shown with yellow background):
If type is 'image':
Key | Description |
---|---|
image | Path to the watermark image. |
height | Watermark image height in pixels (optional). |
width | Watermark image width in pixels (optional). |
decolorate | If true (default) decolorates the image. |
gain | Optional value to customize decoloration: hexadecimal value. |
blacklevel | Optional value to customize decoloration: hexadecimal value. |
scope | Header (default) or footer. |
remove_previous_watermarks | If true (default) removes previous watermarks. |
If type is 'text':
Key | Description |
---|---|
text | The string of text used for watermarking. |
text_orientation | Orientation: diagonal (default) or horizontal. |
height | Watermark text height in pixels (optional). |
width | Watermark text width in pixels (optional). |
font | The font-family. If not set defaults to Calibri. |
color | Hexadecimal value or color name (defaults to silver). |
opacity | Decimal number between 0 and 1. If not set defaults to 0.5 |
scope | Header (default) or footer. |
remove_previous_watermarks | If true (default) removes previous watermarks. |