PDF · 37 tools · nothing uploads

Add header/footer

Stamp text into six slots across the top and foot of every page. {page} and {date} are live.

Input

Add header/footer stamps text into six slots on every PDF page: left, centre and right, along the top and the foot. Write {page}, {pages}, {date}, {time} or {filename} and each is filled in as the file is stamped. The match is case-sensitive, so {Page} is drawn as typed.

Questions

How do I put the page number in the text?

Type {page} where you want it and {pages} for the page count, so "Page {page} of {pages}" comes out as Page 4 of 12 on the fourth page. {total} means the same as {pages}. There is also {date}, {time} and {filename}. Every other character is literal.

Can I set only a footer?

Yes. Fill the slots you want and leave the rest empty, or switch a whole row off. Leaving all six blank is refused with "give a header, a footer, or both", since there would be nothing to stamp. The header sits its own font size below the margin, and the footer sits the margin up from the bottom.

Does it upload my document?

No. pdf-lib loads the file, draws the lines and saves it, all in a Web Worker in this tab. Nothing is transmitted, nothing is retained, and there is no account. You can watch the request counter stay at zero, or disconnect and stamp anyway.

Can I stamp only some pages, or change the position?

The position, yes: six slots, left, centre and right along both edges, with a margin you set. Some pages, no. Every page in the document is stamped the same way. Appearance is the font size, the colour, and bold or regular, always in Helvetica.

Can I use this and Add page numbers on the same file?

You can, but they will overlap. Both default to 24 points from the bottom edge, so a centred footer here lands on a centred page number added there. Pick one: this tool already has {page} and {pages}, so a footer of "{page}" does what Add page numbers does.

What comes back?

One file per PDF you dropped, named with a -headed suffix, so report.pdf gives report-headed.pdf. Drop a whole batch and each is stamped the same way separately, with {pages} and {filename} resolved against each document of its own. Your originals are not modified.

Compare

ToolRuns on the CLILive as you type
Add header/footerYesNo
Add page numbersYesNo
PDF page labelsYesNo
Add watermarkYesNo
Bates numberingYesNo
Sign PDF (draw or image)YesNo

Related PDF tools