Bytefusedocs

Watermark

Text Watermark

Stamp real, selectable vector text across every page of a PDF — a single label positioned anywhere, or a diagonal tiled pattern for the classic “CONFIDENTIAL everywhere” look.

Free to try — no key required 10 credits / callSynchronous

Overview

The watermark is true vector text (not a raster overlay), so it stays crisp and selectable. It’s applied to every page. On the free-try path.

POSThttps://api.bytefuse.in/api/v1/watermark/text

Request

Content type multipart/form-data — all fields are form fields:

filefilerequired
The PDF to watermark. A corrupt or password-protected PDF returns 422.
textstringrequired
Watermark text, 1–100 characters. Non-ASCII (accents, €) is supported via a bundled Unicode font.
positionstringoptional
One of: center · top-left · top-right · bottom-left · bottom-right · top-center · bottom-center. Both hyphen and underscore spellings are accepted. Ignored when tile is true.Default: center
opacityfloatoptional
0.0–1.0. True PDF transparency.Default: 0.3
font_sizeintoptional
8–72 points.Default: 24
colorstringoptional
A 6-digit hex color with a leading #.Default: #000000
rotationintoptional
−180 to 180 degrees. Arbitrary angles are supported.Default: 0
tilebooleanoptional
Repeat the text diagonally across the whole page in a staggered grid. When tile is true and rotation is 0, the pattern defaults to 45°.Default: false

Response

200 OK, application/json:

200 OK
{
  "success": true,
  "url": "https://<r2-host>/watermarked/20260704/<uuid>.pdf",
  "meta": {
    "pages_watermarked": 12,
    "watermark_type": "text",
    "processing_time_ms": 340
  },
  "credits_charged": 1
}
successbooloptional
Always true on 200.
urlstringoptional
Public R2 URL of the watermarked PDF. No expires_at is returned; the link is permanent under the default config.
metaobjectoptional
pages_watermarked, watermark_type, processing_time_ms.
credits_chargedintoptional
Credits billed — 10 authenticated, 0 anonymous. Mirrors X-Credits-Charged.

Examples

curl -X POST https://api.bytefuse.in/api/v1/watermark/text \
  -F "file=@report.pdf" \
  -F "text=CONFIDENTIAL" \
  -F "opacity=0.3" \
  -F "font_size=48" \
  -F "color=#FF0000" \
  -F "rotation=45" \
  -F "tile=true"
# Add -H "X-API-Key: dt_live_your_key" to run authenticated (10 credits).

Errors

422text is empty or over 100 chars; opacity, font_size or rotation out of range; a bad color or position; or a corrupt / password-protected PDF.
402 / 429 / 503Insufficient credits (authenticated), rate limited, or capacity/config error.
500The watermark engine failed unexpectedly.

Need a logo instead of text? See Image Watermark.