pdx:watermarkPdf

Inserts a watermark into a PDF document.

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):

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