Add Watermark
Definition
The Add Watermark action allows you to apply a watermark to a PDF document, either a newly rendered one or an existing one. This action gives you the flexibility to customize the watermark’s appearance, position, and opacity, as well as to apply restrictions or password protection to the document. Whether you're adding text, HTML, or an image as a watermark, this action provides a variety of options for placement, rotation, and opacity, giving you full control over the final output. Additionally, you can set document restrictions such as disabling printing, restricting edits, or controlling copy-paste actions, making this action versatile for securing or branding your PDF documents.
Example Use Cases
1. Branding Documents
Add a company logo or text watermark to every PDF document you generate to ensure that your branding is always visible, even when the document is shared or printed.
2. Securing Sensitive Information
Apply a watermark with a confidential or internal-use-only label to documents containing sensitive information, helping to prevent unauthorized sharing or distribution.
3. Document Version Control
Use watermarks to mark documents as drafts or version numbers, making it clear which iteration of the document is being viewed or shared.
4. Legal and Compliance Documents
Add a watermark to legal documents or contracts to signify that they are final, preventing any alterations to the content without proper authorization.
5. Preventing Unauthorized Distribution
Apply watermarks to PDFs to discourage unauthorized copying, printing, or distribution by marking them with text such as "Confidential" or "Do Not Distribute."
6. Personalizing Documents for Clients
Add a personalized watermark with a client’s name or unique identifier to tailor documents for specific recipients and prevent document tampering.
Inputs
1. Pdf Document
This is the PDF file (payload) that you want to apply the watermark to. You can upload an existing PDF or generate one dynamically in your flow. The watermark will be applied to this document.
2. Pdf Document Password
If the PDF document is password-protected, you need to provide the password here. This ensures that the watermark is applied to the correct document. If the document is not protected, you can leave this field empty.
3. Page Effect
- All: The watermark will be applied to all pages of the PDF.
- Select Manually: Allows you to select specific pages where the watermark should be applied. After selecting this option, a Page field will appear, where you can enter the page numbers (separated by commas) to apply the watermark.
4. Location
- Description: Specifies the general location where the watermark will appear on the page. The options are:
- Top Left
- Top Center
- Top Right
- Middle Left
- Middle Center
- Middle Right
- Bottom Left
- Bottom Center
- Bottom Right
5. Specific Position (Checkbox)
When checked, this option allows you to specify a precise location for the watermark. You can set the distance from the top, right, bottom, and left edges of the page in millimeters to control where the watermark will be placed.
6. Opacity
Controls the transparency of the watermark. The value can be set between 0 (completely transparent) and 100 (completely opaque). This helps in making the watermark visible without obscuring the document content.
7. Rotation
Defines the angle at which the watermark will be rotated. The value can range from 0 to 360 degrees. This is useful for positioning the watermark diagonally or at any other angle on the page.
8. Watermark Mode
Specifies the type of watermark you want to apply:
- Text: Allows you to input text content as a watermark. You can customize the text color (using color codes like
#FF0000
for red orrgb(255, 0, 0)
), background color, font family, and text size. - HTML: Allows you to insert HTML content as a watermark, providing more flexibility in formatting.
- Image: Upload an image to be used as a watermark. You can also specify the image's width (e.g.,
250px
) and height.
9. File Name
The name that will be assigned to the output PDF file after the watermark is applied. You can use a dynamic value to name the file based on the flow’s context.
10. Password Protected (Checkbox)
When checked, this option will apply a password to the newly generated PDF file. You will need to provide a password for the document to be opened.
11. Enable Document Restriction (Checkbox)
When checked, this option applies document restrictions to the PDF. If enabled, additional fields will appear for specifying:
- Owner Password: A password that will allow full access to the document.
- Print Setting: Choose whether printing is allowed, and if allowed, at what resolution (low or full).
- Read-Only: Prevents users from editing the document.
- Edit Setting: Controls what kind of editing is allowed (disable, edit pages only, or edit everything).
- Allow Annotation: Whether annotations can be added to the document.
- Allow Copy Paste Content: Whether content can be copied or pasted from the document.
- Allow Form Data: Whether form data can be filled or extracted from the document.
Step-by-Step Guide
-
Add the "Add Watermark" Action to Your Flow
- Begin by opening your Zenphi flow editor and dragging the "Add Watermark" action into your flow where you want the watermark to be applied.
-
Provide the PDF Document
- In the Pdf Document field, select or upload the PDF document that you want to apply the watermark to. This can be a dynamically generated document or an existing one from a previous action in the flow.
-
Enter the PDF Document Password (if applicable)
- If the PDF document is password-protected, enter the password in the Pdf Document Password field. If the document is not protected, leave this field empty.
-
Choose the Page Effect
- Decide whether you want the watermark applied to all pages or specific pages.
- If you select All, the watermark will be applied to every page in the document.
- If you select Select Manually, a new field will appear where you can specify the page numbers (separate with commas) to which you want to apply the watermark.
- Decide whether you want the watermark applied to all pages or specific pages.
-
Select the Location for the Watermark
- Choose the general Location for the watermark (e.g., Top Left, Middle Center, etc.). This determines where the watermark will appear on each page.
-
Enable Specific Position (Optional)
- If you want more precise control over the watermark’s placement, check the Specific Position checkbox. This will enable additional fields where you can specify the distance in millimeters from the top, right, bottom, and left edges of the page.
-
Adjust the Opacity
- Set the Opacity value between 0 (completely transparent) and 100 (completely opaque). This controls the transparency of the watermark and allows you to adjust its visibility on the page.
-
Set the Watermark Rotation
- In the Rotation field, specify the angle at which the watermark should be rotated. Enter a value between 0 and 360 degrees to rotate the watermark as needed.
-
Choose the Watermark Mode
- Select the Watermark Mode:
- Text: Enter the text you want to use as the watermark. Customize the text’s color, background color, font family, and text size.
- HTML: Insert HTML content for a more customizable watermark.
- Image: Upload an image to use as the watermark and define the image’s width and height (e.g.,
250px
).
- Select the Watermark Mode:
-
Set the File Name
- Provide a name for the output PDF file in the File Name field. This name will be used when saving the new PDF with the watermark.
-
Enable Password Protection (Optional)
- If you want the generated PDF to be password-protected, check the Password Protected checkbox and enter the desired password.
-
Enable Document Restrictions (Optional)
- If you want to apply document restrictions (e.g., disabling printing, restricting editing), check the Enable Document Restriction checkbox. You will then be able to set additional restrictions such as:
- Owner Password: Set a password for full access.
- Print Setting: Define whether printing is allowed and at what resolution.
- Read-Only: Prevent editing.
- Edit Setting: Control the type of editing allowed.
- Allow Annotation: Enable or disable annotation.
- Allow Copy Paste Content: Enable or disable copying and pasting.
- Allow Form Data: Enable or disable form data usage.
- If you want to apply document restrictions (e.g., disabling printing, restricting editing), check the Enable Document Restriction checkbox. You will then be able to set additional restrictions such as:
-
Save and Test Your Flow
- After configuring the action, save your flow and run a test to ensure the watermark is applied correctly to the document. You can view the output PDF file in the next steps of your flow, such as sending it via email or saving it to a drive.
By following these steps, you will successfully add a watermark to your PDF document in your Zenphi flow.
Outputs
The Add Watermark action provides the following outputs:
-
Name
This output returns the name of the newly generated PDF document with the watermark applied. It is helpful for tracking and referencing the document in subsequent actions or steps in your flow.- Example: If you named the document "Invoice_with_Watermark.pdf", this output will return that name.
-
Size
This output returns the size of the newly created PDF document in bytes. This is useful for monitoring the document’s size, especially when dealing with large files or checking if the watermarking process has affected the file size.- Example: A returned size could be
3.2 MB
for the final PDF document.
- Example: A returned size could be
-
PDF Document
This is the most important output as it provides the actual PDF file with the watermark applied. You can use this output to save the file to a drive, send it as an email attachment, or process it further in your workflow.- Example: The PDF document output can be saved in your file storage system or used as an attachment in a subsequent email action.
These outputs allow you to track and use the watermarked PDF document throughout your workflow, whether you're storing, sharing, or processing it further.
Example of Using
Imagine you are automating the process of generating invoices for your clients. You want to ensure that each invoice is watermarked with your company logo or a confidentiality notice to prevent unauthorized sharing.
In this scenario, you can use the Add Watermark action in your workflow to:
- Generate the Invoice: First, you create the invoice as a PDF document.
- Apply Watermark: Use the Add Watermark action to apply your company logo or a confidentiality message on the invoice PDF.
- Save or Send: After applying the watermark, you can save the watermarked PDF to your drive or send it as an email attachment to the client.
By automating this process, you ensure that every invoice is watermarked and properly handled without manual intervention, improving both security and efficiency in your workflow.
Updated 11 days ago