Other PDF Issues

How to Use a Relative PDF Path for an Acrobat Watermark Action

Elise WilliamsElise Williams Nov 3, 2026 868 views

Question details

The user needs to configure an Adobe Acrobat action to use a relative path for a watermark file, ensuring the action does not break when run from a different folder or by another user.

How to Use a Relative PDF Path for an Acrobat Watermark Action
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating or sharing an Acrobat action that applies a background watermark to PDF files located in various directories.
Observed behavior
By default, Acrobat actions store an absolute watermark path. When another user runs the action from a different folder, the path breaks and the watermark fails to apply.
Before you start

Ensure that your watermark background file (e.g., background.pdf) is saved in the exact same folder as the target PDFs you intend to process, and verify that Acrobat has permission to execute local JavaScript.

Solution 1Recommended

Use JavaScript to Set a Relative Watermark Path

Implement a JavaScript command within your Acrobat Action Wizard to dynamically build the watermark path based on the active PDF's location.

Because the default watermark tool in Acrobat hardcodes the absolute file path of the watermark image, sharing the sequence (.sequ) file with other users or moving your project folder will cause the action to fail. By using JavaScript, you can instruct Acrobat to look for the watermark file relative to the document currently being processed.

1
Open the Action Wizard

Launch Adobe Acrobat, navigate to the 'Tools' menu, and select 'Action Wizard'. Choose to edit your existing action or create a new one.

2
Add an Execute JavaScript Step

In the left panel under 'More Tools', find 'Execute JavaScript' and add it to your action sequence. Make sure to place this step before the 'Save' step.

3
Insert the Relative Path Code

Open the JavaScript editor for that step and paste the following code: this.addWatermarkFromFile({cDIPath: this.path.replace(this.documentFileName, "background.pdf")});

4
Test the Acrobat Action

Save the action. Place a test PDF and your 'background.pdf' file in the same folder, run the action, and verify that the watermark is successfully applied.

Use JavaScript to Set a Relative Watermark Path
Warning on editing SEQU files: Do not edit the .sequ file directly in a text editor unless you fully understand Acrobat action-file structures, as this can easily corrupt the file.
Easy PDF Watermarking

Batch Add Watermarks to PDFs Easily with WPS Office

If writing JavaScript code and troubleshooting absolute paths in Acrobat is too complicated, WPS Office provides an intuitive batch watermark tool that requires no coding. You can quickly apply customizable text or image watermarks to multiple PDF files simultaneously.

  1. 1. Open WPS Office PDF: Launch WPS Office and switch to the PDF editing module.
  2. 2. Access the Batch Tool: Navigate to the 'Home' or 'Tools' tab and select the 'Batch' processing option, then choose 'Watermark'.
  3. 3. Add Your PDF Files: Drag and drop all the PDF files you want to watermark into the batch processing window.
  4. 4. Customize the Watermark: Select whether you want to use text or an image. Adjust the opacity, rotation, and placement using the visual interface.
  5. 5. Apply to All Files: Choose your desired output folder and click 'Start' to apply the watermark to all selected PDFs in one click.
No JavaScript or coding requiredBatch process multiple PDFs simultaneously with easeFully compatible with standard PDF formatsHighly customizable text and image watermark settings
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Acrobat watermark action fail on another computer?

Acrobat actions typically save absolute file paths (e.g., C:\Users\Name\Documents\watermark.pdf) by default. When shared with another computer, the drive letter or folder structure changes, causing the action to fail because it cannot locate the watermark file. Using a relative path via JavaScript solves this issue.

Can I adjust watermark opacity using the JavaScript addWatermarkFromFile command?

Yes. The JavaScript addWatermarkFromFile method accepts multiple parameters inside its curly braces. In addition to defining the path, you can set properties like alignment, rotation, and opacity to control exactly how the background appears.

What is a .sequ file in Adobe Acrobat?

A .sequ file is an Adobe Acrobat Action file that stores a sequence of automated commands. While advanced users can sometimes edit it directly with a text editor to modify paths, it is strongly recommended to use the Action Wizard interface within Acrobat to avoid corrupting the sequence structure.