PDF guide

How to add a header and footer to a PDF (page number, date, file name)

By Taha Tahir Ali · Updated

Short answer

Open Header & footer in Raaj PDF, add one or more PDFs, type the header text and footer text, and use {n} for the page number, {total} for the page count, {date} for today's date and {file} for the file name. Pick the position (left, centre or right), font size, colour and margin, list the pages if not all, and download.

Reports, tenders, court bundles and course notes often need the same line at the top or bottom of every page: a company name, a document title, the date, or "Page 3 of 12". Typing it into each page by hand is slow and error-prone. A header and footer tool stamps it onto every page in one go.

Step by step

  1. Open Header & footer in Raaj PDF and add your PDF. You can add several files; each gets its own header and footer.
  2. Type the Header text, for example Acme Traders — Quotation. Leave it empty if you only want a footer.
  3. Choose the Header position: top left, top centre or top right.
  4. Type the Footer text. It starts as Page {n} of {total}, which most documents need.
  5. Choose the Footer position: bottom left, bottom centre or bottom right.
  6. Set the Font size (default 10), Color (default dark grey) and Margin in points from the page edge (default 20).
  7. In Pages, list the pages to stamp, such as 2-10, or leave it empty for all pages.
  8. Click Header & footer, then Download.

The tool runs in your browser, so the file is not uploaded.

Placeholders

Type this You get Example
{n} The page number 3
{total} The number of pages in the file 12
{date} Today's date in your device's format 28/11/2026
{file} The file name without .pdf quotation-acme

Combine them freely: {file} · page {n}/{total} or Printed {date}.

Tips

  • Skip the cover page. Put 2- style ranges in Pages (for example 2-12) so the cover stays clean. Note that {n} still shows the real page number, so the second page says 2.
  • Leave room. If the original pages already have text near the edge, raise the margin or lower the font size so the header doesn't overlap it. Check one page before sending.
  • Other scripts. Latin text is drawn as real text. Text in other scripts, such as Urdu, Arabic or Hindi, is drawn as an image so it still shows correctly, but it can't be selected or searched.
  • Only page numbers? Add page numbers has more number formats. For legal numbering across many files, use Bates numbers.
  • A logo instead of text? See add a logo or stamp to a PDF.

What this tool does not do

It adds text on top of the page; it doesn't move the existing content down to make space, and it doesn't remove an old header. To cover an old header first, use the white-out box in Edit PDF.

Frequently asked questions

Yes. Type {n} or Page {n} of {total} in the header text and leave the footer empty.

Can I add a different header to odd and even pages?

Not in one pass. Run the tool twice with different page lists, for example 1,3,5,7 and then 2,4,6,8 on the result.

Will the header show when I print?

Yes. It becomes part of the page, so it prints and shows in every PDF viewer.

Is it free?

Yes. Raaj PDF is free with no sign-up, and the file stays on your device.

Raaj Software

May you never need us again.

We build solutions that make themselves indispensable, not problems that make us indispensable.

A philosophy of customer independence, not customer dependency.