Skip to content

Add a stamp

POST
/v1/pdf/stamp
curl -H "X-Api-Key: $KEY" -F files=@a.pdf -F files=@logo.png \
-F position=top-right -F scale=0.2 \
http://localhost:9027/v1/pdf/stamp -o branded.pdf

Puts text, an image or a PDF over the content of each page.

Media typemultipart/form-data
object
colour

Hex colour such as #ff0000. Default #808080.

string | null
files
required

The PDF, and optionally an image or PDF to use as the mark.

Array<string>
fontSize

Size of a text mark in points. Default 24.

number | null format: float
opacity

0 to 1.

number | null format: float
outputFilename
string | null
pages

Page selection such as 1-3,5.

string | null
position

top-left, top-center, top-right, center, bottom-left, bottom-center, bottom-right.

string | null
rotation

Degrees.

number | null format: float
scale

Relative to the page width, 0 to 1.

number | null format: float
text

Text for a text mark; omit when sending an image or PDF.

string | null

The stamped PDF

Media typeapplication/pdf

The file, as bytes.

string format: binary

The request is wrong

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}