Skip to main content

Add Image Stamp to PDF

EditAdd Image Stamp to PDF

The Add Image Stamp to PDF API places an image (e.g. logo or watermark) on your PDF. You send the PDF (docContent, docName), the image (imageFile Base64, imageName), alignX and alignY, optional pages, size (mm or px), margins, opacity, isBackground, and showOnlyInPrint. The API returns the PDF with the image stamp applied. Use the tester below to try it; more details are in the sections that follow.

Try the Add Image Stamp to PDF API

Quick reference

Endpoint: POST /api/v2/ImageStamp · Required: api-key, docContent, docName, imageFile, imageName, alignX, alignY

Try it live

Use the form below to send your API key, PDF (Base64), stamp image (Base64), and position. The response is the PDF with the image stamp. No code required—fill the fields and click Send request.

Loading API Tester...

Overview, parameters, and use cases

What is Add Image Stamp to PDF?

This endpoint places an image (logo, watermark, or stamp) on specified pages of a PDF. You choose position via alignX (Left, Center, Right) and alignY (Top, Middle, Bottom), optional size (height/width in mm or px), margins, opacity (0–100), and whether the stamp is in the background or visible only when printing.

Key features

  • Position and sizealignX/alignY; optional heightInMM/widthInMM or heightInPx/widthInPx; margins in mm or px.
  • Opacity – 0 = invisible, 100 = fully opaque (e.g. 50 for a light watermark).
  • Background/foregroundisBackground places the stamp behind or in front of content.
  • Print-onlyshowOnlyInPrint shows the stamp only when printing.
  • Page targetingpages: empty for all, or e.g. 1, 1,3,5, 2-5.
Best for

Use for branding, copyright watermarks, or “DRAFT”/“CONFIDENTIAL” stamps. For text-only watermarks use Add Text 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
  • An image file for the stamp (PNG, JPG, etc.)

Response Format

The API returns a PDF document with the image stamp applied to the specified pages.

Get Help