Add a text or image watermark to a PDF
watermark_pdfAdd 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.
Returns a temporary download link (valid 15 minutes).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | The PDF, base64-encoded. | |
| text | No | Watermark text. Provide text or image, not both. | |
| color | No | Text only. | #808080 |
| image | No | Watermark image (PNG or JPEG), base64. | |
| pages | No | Pages to act on, 1-indexed, e.g. "1-3,5,7-9". Default: all pages. | |
| scale | No | Image only: width as a fraction of the page width. | |
| opacity | No | Watermark opacity from 0.05 (almost invisible) to 1 (solid). Default 0.3. | |
| position | No | Where the watermark goes: "center" (default), "top-left", "top-right", "bottom-left" or "bottom-right". | center |
| rotation | No | Rotation of the watermark in degrees (-360 to 360). Default 45 (diagonal). | |
| font_size | No | Text only. |