pdf_watermark
Add PDF Watermark — STAMP or watermark a PDF: overlay text or an image across every page (or selected pages) — the tool for stamping DRAFT, CONFIDENTIAL, PAID, APPROVED, COPY or any wording onto a document, marking pages, branding them, or adding a logo overlay. Watermark type is chosen by the 'mode' field. [category: pdf]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Input PDF (filename must end in .pdf) | |
| mode | No | Watermark type. 'image' requires the imageFile field — presence of an image alone does NOT switch modes. | text |
| text | No | Watermark text (used when mode=text). | CONFIDENTIAL |
| tile | No | Repeat the watermark in a tiled pattern. | |
| color | No | Hex color #rgb or #rrggbb (mode=text). | #808080 |
| pages | No | Comma-separated page numbers e.g. '1,3,5'. Empty = all pages. | |
| scale | No | Size multiplier. With tile=true only values in (0,1] count (fraction of page) — anything else silently tiles at 0.3. | |
| opacity | No | 0-1 float; non-numeric resets to 0.3, but out-of-range values reach the PDF engine and 500. NOT a percent. | |
| fontSize | No | Point size on the page (mode=text only). Non-integer input silently resets to 48. | |
| position | No | Long names like 'bottom-right' are NOT recognized and silently fall back to c. ml/mr work (folded to engine anchors l/r). | c |
| rotation | No | Whole degrees only — a decimal string like '45.5' silently resets to 45. | |
| imageFile | No | Watermark image — PNG, JPG, or SVG. REQUIRED when mode=image; ignored otherwise. | |
| fontFamily | No | Outside the enum it silently becomes Helvetica. All three are Latin-1 — non-Latin text is refused 400 (use mode=image). | Helvetica |
| outputFilename | No | Optional custom output filename. |