Create a DDX document that adds a dynamic watermark

Here are the steps for creating a DDX document that creates a PDF document that adds a watermark to a result PDF. The text in the watermark can be provided at runtime.

  1. Specify the resultant document by selecting New Result > PDF. In the PDF Result panel, leave the default values unchanged.

  2. Drag the PDF icon from the Sources panel onto your canvas. Position the icon under the PDF result icon added in the previous step. In the PDF Result panel, leave the default values unchanged.

  3. Drag a Watermark icon from the Page Content panel. Position the icon on top of the PDF result icon.

  4. Select the Watermark icon.

  5. Select the Content tab in the Watermark panel and copy the following expression into the white field:

    <StyledText> 
         <p> 
           <String url="inputmap:///companyStrings/watermarkString">Temporary string</String> 
         </p> 
    </StyledText>
    To delete an icon, right-click the icon and select Delete.
  6. Click Apply.

  7. Save your work and then click Validate to validate the DDX. (See Validating the DDX Document.)

  8. Click Preview to view an example of the resultant document. (See Previewing the Result from a DDX Document.)

  9. (Optional) Apply properties to the result and PDF source icons. (See Set PDF result and source properties.)

Here is the appearance of the canvas that the previous steps create. The resulting DDX document produces a PDF document that bears a watermark. The styled text for the watermark is provided by the input map URL inputmap:///companyStrings/watermarkString. If the URL is omitted, the default value Temporary string is used. The input map allows the text in the watermark to be assigned dynamically.

To see the resulting DDX document, click Source (upper-right corner). Here is the DDX source that these steps create.

<DDX xmlns="http://ns.adobe.com/DDX/1.0/"> 
     <PDF result="Untitled 1"> 
       <PDF source="sourcePDF1"/> 
       <Watermark> 
         <StyledText> 
           <p> 
             <String url="inputmap:///companyStrings/watermarkString">Temporary string</String> 
           </p> 
         </StyledText> 
       </Watermark> 
     </PDF> 
     <?ddx-source-hint name="sourcePDF1"?> 
</DDX>