Add Page Numbers
Add professional page numbers to PDF documents online. Supports 6 header/footer positions, custom prefixes, page rotation compensation, and skip cover page options.
How to use Add Page Numbers
Add clean, professional pagination, headers, and footers to multi-page PDF documents directly in your web browser. TechIdea's Add Page Numbers tool supports six standard header and footer positions, multiple numbering formats ('Page X of Y', 'X', '- X -'), customizable starting numbers, and edge inset margins. Crucially, our engine incorporates automatic page rotation compensation: pages tagged with 90°, 180°, or 270° orientation metadata have coordinate matrices adjusted so page numbers always render upright and readable.
- Select or drag and drop your PDF document into the upload dropzone.
- Choose from 6 pagination positions across top headers or bottom footers.
- Select your numbering style: 'Page 1 of N', '1 (Number only)', or '- 1 - (Hyphen)'.
- Configure your starting number and edge margin slider (15pt to 60pt).
- Specify whether to number All Pages or enter a custom range (e.g., '2-25' to skip cover pages).
- Click 'Add Page Numbers' and download your perfectly formatted document.
Rotated Coordinate Mapping & Viewport Geometry Transformation
The pagination engine evaluates each page's MediaBox dimensions `(W, H)` and rotation angle `page.getRotation().angle` (0°, 90°, 180°, or 270°). For standard pages, text coordinates are calculated using font string width `font.widthOfTextAtSize(text, fontSize)`. For rotated pages, the engine calculates the transformed visual viewport and applies compensatory rotational transform `degrees(360 - rotationAngle)`. This ensures that regardless of how the page is oriented in the reader's view, headers and footers appear in the user's expected orientation.
- Orientation Compensation: Automatically detects and compensates for 90°, 180°, and 270° page rotations.
- 6 Position Presets: Supports top-left, top-center, top-right, bottom-left, bottom-center, and bottom-right.
- Flexible Numbering Sequences: Configure custom start indices and total page count denominators.
- Zero Server Uploads: PDF stream mutation runs 100% locally in your browser's memory.
All PDF operations are processed entirely inside your local web browser. Your files, documents, and data are never sent to external servers or cloud services.
How does the tool handle rotated landscape pages?
In many PDFs, landscape pages are stored with portrait dimensions and a `/Rotate 90` or `/Rotate 270` dictionary tag. Naive tools draw numbers using raw coordinates, placing them sideways or offscreen. Our engine inspects `page.getRotation().angle` and applies inverse coordinate rotation, guaranteeing numbers appear right-side up.
How can I skip numbering the title or cover page?
Select 'Specific Pages' and enter `2-[total]` (for example, `2-10`). The cover page will remain untouched, and numbering will begin cleanly on page 2.
Can I start numbering from a number other than 1?
Yes! Use the 'Start Number From' input. For example, if you are preparing Part 2 of a manual that follows a 50-page Part 1, you can set the start number to 51.
What font is used for page numbering?
We use standard embedded Helvetica typography sized at 10pt with clean charcoal gray contrast (`rgb(0.2, 0.2, 0.2)`), providing subtle, professional pagination that blends into any business document.