Free plan

Headers, Footers, Page Numbers

Add headers, footers and page numbers to every page
POST
/v1/pdfs/headers-footers

About this tool

This tool writes text at the top and bottom of your PDF pages. You can add a header, a footer and page numbers, each with a left, middle and right part. The text can include the page number, the total pages, today's date and the document title. You choose the number style, the first number, the font size and colour, and which pages to mark.
For example, you add Page 2 of 10 at the bottom of every page of a report.

How to use it

  1. Choose this tool.
  2. Add your PDF with Upload or drag and drop.
  3. Type the header and footer text, or switch on page numbers.
  4. Choose the number style, the start number and whether to skip the first page.
  5. Press Generate, then download the PDF.

What you get back

You get a new PDF with the text and numbers on its pages, ready to download.
TEST IT LIVE

Try Headers, Footers, Page Numbers in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/headers-footers
Tool ID
pdfs.headers-footers
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/headers-footers" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'numbering=arabic' \
  -F 'margin=28' \
  -F 'fontSize=10'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.headersFooters({
    "file": 'document.pdf',
    "numbering": "arabic",
    "margin": 28,
    "fontSize": 10
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->headersFooters([
    'file' => 'document.pdf',
    'numbering' => 'arabic',
    'margin' => 28,
    'fontSize' => 10,
]);
echo $result->requestId;
FAQ

Frequently asked questions

Write text at the top and bottom of pages: a header, a footer and page numbers, each with left / centre / right parts and templates ({n} {total} {date} {title}). Any script works; Latin text stays real PDF text.

Headers, Footers, Page Numbers accepts PDF. You can send several files in one request.

Headers, Footers, Page Numbers is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/pdfs/headers-footers with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.