Watermark Plug-in
This is a DITA-OT Plug-in to add a watermark to generated PDF files. The plugin extends standard PDF processing. It offers an extension-point for further processing.
Example
Install
Run the plug-in installation commands:
dita install https://github.com/jason-fox/fox.jason.watermark/archive/master.zip
The dita command line tool requires no additional configuration.
Usage
The plugin extends standard PDF processing:
dita --format pdf \
--output out \
--input document.ditamap \
--pdf.watermark=draft|review|final
By default the output PDF will be watermarked as a DRAFT.
Parameter Reference
-
pdf.watermark - Decides which watermark to use:
- draft - Adds a watermark stating DRAFT DOCUMENT
- review - Adds a watermark stating Copy for review only
- final - Adds an nearly invisible FINAL watermark
- none - Does not add a watermark
Extension points
This plug-in is designed to be extended and offers an extension point:
- watermark.pre - Runs an additional ANT target before the watermarking processing stage.
Example
The following plugin.xml
will enable the watermarking of PDF
files to depend on an authorization server.
A working example can be found in the Authorized Watermark DITA-OT plug-in.