You can configure CCMS Output Generator so that an output type always includes a watermark.
For more information about creating watermark images, refer to Watermark graphic creation.
To add a watermark to every PDF:
-
You must first create and add the watermark image to the CCMS Output Generator.
Note: The watermark image can have any name, and can be in
any image format, other than SVG.
- Copy the watermark image to %OutputGenDir%/data/resources/client.
-
Add the relevant lines to the appropriate PDF targets in your conductor
file.
Suppose the Acme company wants to add a draft watermark using
draft-watermark.png.
<target name="Acme_PDF" depends="default_dependencies, flatten, resolve_container_keyref, extract_HiRes_images">
<echostart>Acme_PDF</echostart>
<!-- These are the required target calls to do -->
<ot_build_add_ditaval_ifpresent/>
<ot_build_clean_ot_temp/>
...
<!-- Set the property job.keep.temp to preserve the completed temp folder of the task -->
<!--<property name="job.keep.temp" value="yes"/>-->
<move file="${outgen.job.output.dir}/${outgen.job.source.name.noext}.pdf" todir="${outgen.job.dir}"/>
<watermark execute="true"
inputfile="${outgen.job.dir}/${outgen.job.source.name.noext}.pdf"
tempfile="${outgen.job.output.dir}/${outgen.job.source.name.noext}.pdf"
imagefile="${outgen.resources.dir.client}/draft-watermark.png"/>
<echoend>Acme_PDF</echoend>
</target>
-
Save your changes to the conductor file.
You do not need to restart CCMS Output Generator. The watermark will be present in all PDFs created using the output type that corresponds to the target you edited.