PDF

Add page numbers to a PDF

Stamps a page number on every page (or on pages). The format text must contain {n}; it can also use {total}.

Costs 1 credit per call.

post/pdf-page-numbers

Request

  • Base URL: https://api.cofferdock.com
  • URL: https://api.cofferdock.com/pdf-page-numbers
  • Auth: API key in header x-api-key

Request body

filestring byte required

The PDF, base64-encoded.

formatstring

e.g. "Page {n} of {total}".

position'bottom-center' | 'bottom-left' | 'bottom-right' | 'top-center' | 'top-left' | 'top-right'

Where to print the number: "bottom-center" (default), "bottom-left", "bottom-right", "top-center", "top-left" or "top-right".

startinteger

Number shown on the first page (default 1).

font_sizenumber

Font size in points (6-72). Default 10.

marginnumber

Distance from the page edge to the number, in points (0-200). Default 24.

colorstring

Text color as a hex code, e.g. "#000000" (black, default).

pagesstring

Pages to act on, 1-indexed, e.g. "1-3,5,7-9". Default: all pages.

output'json' | 'binary' | 'url' | 'pdf'

How to return the PDF: "json" (base64 in the JSON response), "binary" (the PDF itself, ready for n8n/Make/Zapier) or "url" (a temporary download link, valid 15 minutes). Default: json when the request is JSON, binary when the input was sent raw.

Response

The resulting PDF (shape depends on output).

OR

Changes

No recorded changes to this operation across all 1 revision of this API.