PDF

Add a text or image watermark to a PDF

Overlays a text (max 200 characters) OR a PNG/JPEG image on every page (or on pages). Image watermarks need the JSON body.

Costs 1 credit per call.

post/pdf-watermark

Request

  • Base URL: https://api.cofferdock.com
  • URL: https://api.cofferdock.com/pdf-watermark
  • Auth: API key in header x-api-key

Request body

filestring byte required

The PDF, base64-encoded.

textstring

Watermark text. Provide text or image, not both.

imagestring byte

Watermark image (PNG or JPEG), base64.

opacitynumber

Watermark opacity from 0.05 (almost invisible) to 1 (solid). Default 0.3.

rotationnumber

Rotation of the watermark in degrees (-360 to 360). Default 45 (diagonal).

position'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'

Where the watermark goes: "center" (default), "top-left", "top-right", "bottom-left" or "bottom-right".

font_sizenumber

Text only.

colorstring

Text only.

scalenumber

Image only: width as a fraction of the page width.

pagesstring

Pages to act on, 1-indexed, e.g. "1-3,5,7-9". Default: all pages.

output'json' | 'binary' | 'url' | 'pdf'

How to return the PDF: "json" (base64 in the JSON response), "binary" (the PDF itself, ready for n8n/Make/Zapier) or "url" (a temporary download link, valid 15 minutes). Default: json when the request is JSON, binary when the input was sent raw.

Response

The resulting PDF (shape depends on output).

OR

Changes

No recorded changes to this operation across all 1 revision of this API.