ForHosting KIT · Documents & PDF

Add page numbers to a PDF

A hundred-page document with no page numbers is a small daily frustration multiplied across every reader who has to say 'go to the page with the chart' instead of 'page 42.' This endpoint adds numbering to every page of a PDF automatically, in whatever position and format the document calls for.

● StablePer request + per page$0.002
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

A detail nobody notices until it's missing

Page numbers are one of those things readers only consciously register by their absence — trying to reference a specific page on a call, cite a section in a review, or find your place again after closing a long PDF. Documents assembled by merging several PDFs together are especially prone to missing or inconsistent numbering, since each source file may have had its own scheme or none at all. This endpoint fixes that in one pass, applied uniformly across the final file.

What the numbering actually offers

You control where the numbers sit — bottom center, bottom corner, top of the page — what they look like, whether they read as a bare number or a pattern like 'Page 3 of 40', and where counting starts, which matters when a cover page or table of contents shouldn't be counted as page one. The numbers are written directly into the page content, so they display consistently across every PDF viewer and survive printing.

How the call is made

POST the PDF along with your position, format and starting-number preferences to /pdf/page-numbers. It's processed asynchronously: a task_id comes back right away, and the numbered PDF is delivered to your signed webhook when it's ready, or made available at a signed link valid for 24 hours.

Its place in a bigger document flow

This step almost always follows something else — merging PDFs, generating a report, or assembling a packet from several source documents — and precedes final delivery. Running it as the last step in a document-assembly pipeline guarantees the final page count and numbering are always correct, even when the number of merged sections changes from run to run.

Cost and reliability

It's a flat $0.002 per request no matter how many pages get numbered, so numbering a 5-page memo and a 500-page manual are billed the same predictable rate. If the task can't complete after its automatic retries, you're never charged for it.

Merged document packets

Several PDFs get combined into one packet for a filing or a board meeting; this endpoint applies consistent numbering across the whole merged file.

Long reports and manuals

A generated report runs dozens of pages; adding 'Page X of Y' numbering makes it navigable and citable for readers and reviewers.

Legal and academic submissions

Court filings and academic papers often require specific page numbering conventions before submission, applied automatically at export time.

Printed handouts and booklets

A PDF destined for print needs numbering so pages stay in order and are easy to reference after collating.

How do I add page numbers to a PDF via API?

Send the PDF and your formatting preferences to /pdf/page-numbers in a POST request, and the numbered file returns via webhook or a signed link.

Can I choose where the page numbers appear?

Yes, you can set the position — such as bottom center or a top or bottom corner — to match the document's existing layout.

Can numbering start from a page other than one?

Yes, you can set the starting number, which is useful when a cover page or table of contents shouldn't count toward the numbering.

Does it support formats like 'Page 3 of 40'?

Yes, you can choose a bare number or a pattern that includes the total page count alongside the current one.

Is adding page numbers free?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

Will the numbers show up correctly in every PDF viewer?

Yes, since the numbers are written into the page content itself rather than relying on viewer-specific features.

Can I number a batch of PDFs at once?

Submit one task per document; each is billed and processed independently for predictable, linear scaling.

What happens if the page-numbering task fails?

It retries automatically up to three times, and if it still doesn't succeed you get a clear error with no charge.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/pdf/page-numbers

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/pdf/page-numbers \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pdf":"https://ejemplo.com/documento.pdf"}'
{
  "pdf": "https://ejemplo.com/documento.pdf"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "pdf.page_numbers",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb25
max_pages200
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
413input_too_largeThe file exceeds the size limit.

Read the full KIT documentation →