Watermark PDF
pdf_watermarkAdd centered or tiled text or image watermarks to selected PDF pages with opacity, angle, size, color, and page-range controls, including image fallback for unsupported text.
Instructions
Stamp a text or image watermark on PDF pages: centred or tiled across the page, with opacity, angle, size, colour and a page range. It reads upright on rotated pages. Text the standard PDF fonts cannot draw (Arabic, CJK…) is stamped as an image. Defaults match the website: "CONFIDENTIAL", Helvetica Bold 72 pt, #d64545, 25% opacity, 45°. Web version: https://s3eidat.github.io/pdf-watermark/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gap | No | Space between tiles in points (tile mode). Default 80. | |
| file | Yes | The PDF: a local file path (absolute, or relative to the server's --root) or base64 data (raw or a data: URI). | |
| font | No | Font for text. | HelveticaBold |
| mode | No | "center": one stamp in the middle; "tile": repeated across the page. | center |
| size | No | Text size in points. Default 72. | |
| text | No | Watermark text (default "CONFIDENTIAL"). Ignored when "image" is given. | |
| angle | No | Rotation in degrees, counter-clockwise as shown. Default 45. | |
| color | No | Colour as hex "#rrggbb". Default #d64545. | #d64545 |
| image | No | Image watermark instead of text: a local path or base64 (PNG, JPEG, WebP, SVG…). | |
| pages | No | Pages to stamp: 1-based list like "1-3, 5, 8-" ("5-" = to the end, "-3" = first three, "3-1" = reversed). Also "all", "odd", "even", "last". Empty = all pages. | |
| scale | No | Image width as % of the page width. Default 40. | |
| output | No | Where to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set). | |
| opacity | No | Opacity in % (1-100). Default 25. | |
| returnBase64 | No | Also return the output as base64 in the result (only for small files). Default false. |