Skip to main content

Add Text Stamp to PDF

EditAdd Text Stamp to PDF

The Add Text Stamp to PDF API adds a text watermark or stamp to your PDF. You send the PDF (docContent, docName), pages, text, alignX and alignY, optional margins, opacity, font (fontName, fontSize, fontColor, isBold, isItalics, underline), rotate (0, 45, 90, -45), isBackground, showOnlyInPrint, fitTextOverPage, and async. The API returns the PDF with the text stamp applied. Use the tester below to try it; more details are in the sections that follow.

Try the Add Text Stamp to PDF API

:::note Quick reference Endpoint: POST /api/v2/Stamp · Required: api-key, docContent, docName, pages, text, alignX, alignY :::

:::info Try it live Use the form below to send your API key, PDF (Base64), watermark text, and position. The response is the PDF with the text stamp. No code required—fill the fields and click Send request. :::

Loading API Tester...

Overview, parameters, and use cases

What is Add Text Stamp to PDF?

This endpoint adds a text watermark or stamp to specified pages of a PDF. You provide the text, position (alignX, alignY), optional margins (mm or px), opacity (0–100), font (fontName, fontSize, fontColor, isBold, isItalics, underline), rotate (0, 45, 90, -45), isBackground, showOnlyInPrint, and fitTextOverPage to stretch text across the page. The API returns the PDF with the text stamp applied.

Key features

  • Text and positiontext, alignX (left, center, right), alignY (top, middle, bottom), margins in mm or px.
  • StylingfontName (Arial, Times New Roman, Helvetica, Courier New), fontSize (8–72), fontColor (hex), isBold, isItalics, underline.
  • Rotationrotate: 0 (horizontal), 45 (diagonal), 90 (vertical), -45 (reverse diagonal).
  • Opacity – 0 = invisible, 100 = fully opaque (e.g. 30 for a light watermark).
  • Background/foregroundisBackground; showOnlyInPrint; fitTextOverPage to fit text over the entire page.

:::tip Best for Use for “CONFIDENTIAL”, “DRAFT”, or “COPY” watermarks. For image-based stamps use Add Image Stamp to PDF; for signing use Sign PDF. :::

Prerequisites

Before using this endpoint, make sure you have:

  • A valid PDF4me API key (Get your API Key)
  • A PDF document in Base64 format or a public URL to a PDF file

Response Format

The API returns a PDF document with the text stamp/watermark applied to the specified pages.

Get Help