pdfwatermarks Step

Use this step to add watermarks to a PDF document

Last published at: May 16th, 2024

Description:

This step creates a copy of the PDF document by including a watermark. 

 

Inputs

  • inputFilePath - Input File Path
  • watermarkText - Watermark Text
  • watermark location - Watermark text location
  • fontSize - Font size integer must be greater than zero
  • fontColor - Font color picker
  • outputFilePath – Output file path
  • pdfVirtualPath – PDF Virtual file path
 

 

Returns

  • True – step executed successfully
  • False – step failed to execute 
  • Error - step execution error 
 

 

Usage:

 

 

Example:

Let’s build and execute the pdfWatermarks example.                             

  • Create a new definition called “pdfWatermarksDef”
  • Select the definition and click the “design” button
  • Drag  the “pdfWatermarks” step to the canvas
  • Connect the dots between the start and the step, as shown in the above image 
  • Define a few variables/globals to store the file path result after execution
  • Click the "pdtWatermarks" step to configure its "Settings" properties. Give the step a name. Provide the source file path on the application server. Provide the watermark text. Provide the watermark text location on the document. Provide the variable references to hold the Output and Virtual PDF file paths. Click the Save button to confirm. 
  • Click the "pdtWatermarks" step to configure its "Advanced" properties. Provide the font size with an integer value greater than zero. Select the font color from the drop-down color picker list. Click the Save button to confirm. 
  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.
  • Save the process definition, create a new instance, and execute. Render the process instance. Click on the “pdtWatermarks” process step to view the properties. The step should be to make a copy of the PDF with a watermark inserted per the configuration. Copy and paste the pdfVirtualPath variable value into a browser window to view the merged PDF file.