§ Mark and adjust
Watermark and Stamp PDF API
One endpoint for both jobs: stamp mode paints on top of the page content, watermark mode paints underneath it. Text or an image, at the position, angle, scale, and opacity you choose, across the whole document or only the pages you name.
- Endpoint
- POST /pdf/stamp
- Inputs
- Exactly 1 PDF
- Aux part
- stamp — one image, when stamping a logo instead of text
- Returns
- application/pdf
- Limits
- 20 MB per file, 3,000 pages.
- Price
- $0.001
§ 01 The request
One POST, and the file comes back.
POST /pdf/stamp
curl -sS --fail-with-body \
-o watermarked.pdf \
-H "Authorization: Bearer $OHMYWRAP_KEY" \
-F "file=@draft.pdf" \
-F 'options={"mode":"watermark","text":"DRAFT","opacity":0.15,"diagonal":"llToUr"}' \
https://api.ohmywrap.com/pdf/stampOptions
| Option | Type | Default | What it does |
|---|---|---|---|
| mode | string | stamp | `stamp` (on top) or `watermark` (underneath). |
| text | string | — | Stamp text. Required unless a `stamp` image part is sent. |
| font | string | Helvetica | `Helvetica`, `Times-Roman`, or `Courier`. Core fonts only. |
| fontSize | int | — | Must be positive. |
| color | string | — | #RRGGBB. |
| opacity | float | — | 0 to 1. |
| rotation | float | — | −180 to 180. Mutually exclusive with `diagonal`. |
| diagonal | string | — | `none`, `llToUr`, `ulToLr`. Mutually exclusive with `rotation`. |
| position | string | c | tl tc tr l c r bl bc br. |
| scale | float | — | Relative 0–1, or any positive value with `scaleAbsolute`. |
| scaleAbsolute | bool | false | Treat `scale` as absolute rather than relative. |
| pages | string[] | all pages | Page selection: "2", "2-4", "odd", "even", "3-", "-2". Ranges are clamped to the document. |
Worth knowing
Sending both `text` and a `stamp` image is 422 invalid_stamp. Custom TTF fonts are not supported: they need a writable font cache, and this service has no writable filesystem.
Your first /pdf/stamp call takes one line of curl.
Ten thousand calls cost ten dollars, the pack never expires, and nothing you send is kept.
10,000 calls for $10. No subscription, no expiry.