Overlay Watermark PDF JavaScript

Overlay PDFs with another PDF page as a watermark. Choose source page, scale, opacity, position, page ranges, links, and style.

Watermark Tools

Overlay Watermark PDF JavaScript Overview

Use a PDF page as an overlay watermark across target PDFs for branding and background graphics. Select the source PDF overlay file and page, control scale and opacity, and position the overlay on each page. Apply to specific pages or ranges, set a watermark style, and add interactive actions such as external links or go‑to page navigation. Respect page rotation and place the overlay precisely for consistent, professional results across batches and automated workflows.

PDF Overlay Watermarking

Overlay one PDF onto another to add letterheads, stamps, headers, footers, or templates without altering layout or quality.

Layered PDF Watermark Control

Apply watermark PDFs as foreground or background layers without modifying the original PDF content.

Pixel-Perfect Alignment

Ensure precise scaling, positioning, and alignment between source and watermark PDFs for professional layouts.

High-Performance PDF Processing

Overlay PDFs in seconds with scalable cloud processing, optimized for single files or high-volume batch workflows.

Customizable Parameters

Fine-tune your automation with these powerful conversion options

File

File Supported formats: .pdf

File to be converted. Value can be URL or file content.

Password

String

Sets the password to open protected documents.

PageRange

String Default: 1-2000

Set page range. Example 1-10 or 1,2,5.

OverlayFile

File Supported formats: .pdf

Specifies the PDF file to use as overlay. Value can be URL or file content.

OverlayPage

Integer Default: 1

Specifies the page to use as overlay from the OverlayFile file.

Range:   1 .. 2000

Scale

Integer Default: 100

Specifies the watermark scale in percent.

Range:   0 .. 2000

Opacity

Integer Default: 100

Specifies watermark opacity level.

Range:   0 .. 100

Style

Collection Default: watermark

Specifies watermark style, stamp or watermark. The stamp is placed over page content and watermark under page content.

Values:   stamp watermark

GoToLink

String

Specifies the web address to go when the watermark is clicked.

GoToPage

String

Specifies the page number to go when the watermark is clicked.

PageRotation

Bool Default: False

Specifies whether the watermark should respect the PDF page rotation. When enabled, the watermark is rotated together with the page. When disabled, the watermark is placed ignoring page rotation.

PageBox

Collection Default: mediabox

Specifies the PDF page box used as the reference area for applying the watermark.

Values:   mediabox trimbox bleedbox cropbox

MeasurementUnit

Collection Default: pt

Measurement unit for position and size parameters.

Values:   pt in mm cm

OffsetX

Double

Specifies the watermark offset along the X-axis. Positive values move the watermark to the right, while negative values move it to the left, using the selected MeasurementUnit.

Range:   -10000 .. 10000

OffsetY

Double

Specifies the watermark offset along the Y-axis. Positive values move the watermark downward, while negative values move it upward, using the selected MeasurementUnit.

Range:   -10000 .. 10000

HorizontalAlignment

Collection Default: center

Specifies the horizontal watermark alignment.

Values:   left center right

VerticalAlignment

Collection Default: center

Specifies the vertical watermark alignment.

Values:   top center bottom

StoreFile

Bool Default: False

When the StoreFile parameter is set to True, your converted file is written to ConvertAPI’s encrypted, temporary storage and made available via a time-limited secure download URL, valid for up to 3 hours. After this period, the file is permanently deleted.

When StoreFile is set to False, conversion happens entirely in-memory. The raw file bytes are streamed back in the API response without touching disk or external storage, ensuring maximum security and zero persistence so that only you can access the content.

Step-by-Step Guide

Easy Overlay Watermark PDF integration programmatically using our simple JavaScript SDK

1. ConvertAPI JavaScript library install

ConvertAPI provides a JavaScript module that allows you to perform a Overlay Watermark PDF conversion with just a few lines of code. First, install the convertapi-js@~1.1 package from npm:

NPM package >
npm i convertapi-js@~1.1

If you are interested in our old version of non-module JavaScript library you can find it here.

2. Authenticate your JavaScript library

Next, obtain your API Token by signing up for a free account. Once you sign up, you'll receive 250 free conversions instantly! Grab your API Token from the account dashboard, and authenticate the ConvertAPI JavaScript library like this:

import ConvertApi from 'convertapi-js'
let convertApi = ConvertApi.auth('api_token')

3. Overlay Watermark PDF using JavaScript in no time!

Once you have your authentication in place, simply copy-paste this pdf to pdf-watermark conversion code snippet into your JavaScript project. Overlay Watermark PDF documents using JavaScript with no effort at all!

Integrate within minutes

Easy Overlay Watermark PDF automation using our simple JavaScript SDK

Try the Overlay Watermark PDF conversion online

Try it Free

Compatible With all JavaScript Frameworks & Tools

Compatible with JavaScript Compatible with TypeScript Compatible with React Compatible with Vue.js Compatible with Angular Compatible with Webpack Compatible with WebStorm

Businesses trust us

Highest rated File Conversion API on major B2B software listing platforms: Capterra, G2, and Trustpilot.

"ConvertAPI has been a game-changer for our document automation workflows. Their conversion accuracy and API reliability are unmatched in the industry for over 7 years."

"ConvertAPI is a reliable, cost-effective solution with a proven track record of stability. It has grown significantly in maturity, adopting enterprise-grade practices over the years."

"We've integrated ConvertAPI across our entire document processing platform. The performance is exceptional and the support team is always responsive. Highly recommended!"

Enterprise-Grade Security

We ensure that all document processing is handled securely in the cloud, adhering to industry-leading standards like ISO 27001, GDPR, and HIPAA. To enhance security even further, we can ensure that no files or data are stored on our servers and never leave your country.

Learn more about security

Ready to Streamline Your File Conversions?