ohmywrap
Get an API key

§ 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/stamp

Options

Options accepted inside the options JSON object
OptionTypeDefaultWhat it does
modestringstamp`stamp` (on top) or `watermark` (underneath).
textstringStamp text. Required unless a `stamp` image part is sent.
fontstringHelvetica`Helvetica`, `Times-Roman`, or `Courier`. Core fonts only.
fontSizeintMust be positive.
colorstring#RRGGBB.
opacityfloat0 to 1.
rotationfloat−180 to 180. Mutually exclusive with `diagonal`.
diagonalstring`none`, `llToUr`, `ulToLr`. Mutually exclusive with `rotation`.
positionstringctl tc tr l c r bl bc br.
scalefloatRelative 0–1, or any positive value with `scaleAbsolute`.
scaleAbsoluteboolfalseTreat `scale` as absolute rather than relative.
pagesstring[]all pagesPage 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.