>>
Format multi-page PDF documents, academic papers, reports, and legal filings with our free Add Page Numbers to PDF Tool. Easily stamp custom page counts (such as Page 1 of 10 or plain numbers) into headers or footers across all pages. Select from 6 alignment positions, adjust font size, and set custom starting numbers—all rendered locally inside browser RAM with 100% privacy.
Load your PDF file into the client-side page numbering workspace.
Configure page number positions, start index, font family, size, and header/footer margins.
Click Add Page Numbers to apply dynamic page counters and download your stamped PDF.
Choose between plain numbers, "Page X", "X of Y", or formal "Page X of Y" labels to match any document specification.
Position numbers across 6 standard page coordinates (Top/Bottom, Left/Center/Right) with font size adjustments from 6pt to 24pt.
All PDF modifications run directly in client RAM using pdf-lib. Your confidential documents are never uploaded to any remote server.
PDF (Portable Document Format) files represent content through a hierarchy of object dictionaries, including page tree nodes (/Pages) and page content streams (/Contents). Stamping page numbers involves embedding a standard Helvetica font dictionary into the PDF document's global resources and appending new operator instructions to each page's content stream.
To ensure precise position alignment regardless of page dimensions (e.g. Letter, A4, or custom landscape sizes), the client-side engine queries each page's MediaBox dimensions (width and height). Using font width metrics (font.widthOfTextAtSize(text, fontSize)), the algorithm calculates exact X/Y coordinate offsets in 72 DPI PDF point coordinates, accurately centering or right-aligning page numbers in headers and footers.
Executing this modification with pdf-lib inside client browser RAM avoids re-encoding raster graphics or flattening vector text. As a result, original document sharpness, hyperlinks, and searchability remain untouched while generating a clean, professionally formatted PDF.