Categories

PDF Page Numbering Styles

Convert HTML to PDF with Roman, Arabic, or chapter-prefixed page numbers

Generate a PDF from HTML and stamp page numbers in the style you choose.

Numbering styles:

  • Arabic or Roman numerals
  • Chapter prefix with template support (use {chapter})
  • Optional total pages and custom prefix/suffix

Placement:

  • Header or footer positions
  • Custom edge offset and font size

Example Results

1 examples

Page Numbering Styles

Roman/arabic numbering demonstration

page-numbering-styles-example1.pdf View File
View input parameters
{ "htmlContent": "\n<h1>Quarterly Report</h1>\n<p>This is a generated test document.</p>\n<div style=\"page-break-after: always;\"></div>\n<h2>Second Page</h2>\n<p>More sample content.</p>\n", "cssContent": "\nbody { font-family: Arial, sans-serif; }\nh1, h2 { color: #1f2937; }\np { font-size: 12pt; }\n", "numberingStyle": "arabic", "includeTotalPages": true, "numberPosition": "footer-right" }

Key Facts

Category
Document Tools
Input Types
textarea, select, checkbox, number, text, color
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

Easily convert your HTML content into professional PDFs with customizable page numbering styles, including Arabic numerals, Roman numerals, and chapter-prefixed formats.

When to Use

  • When you need to generate professional reports or documentation from HTML templates.
  • When you require specific pagination styles like Roman numerals for front matter or chapter-based numbering for technical manuals.
  • When you need to add consistent headers or footers with page counts to your generated PDF documents.

How It Works

  • Paste your HTML content and optional CSS into the editor to define your document structure and styling.
  • Select your preferred numbering style, such as Arabic, Roman, or a custom chapter-prefixed template.
  • Configure the placement, font size, and edge offsets for your page numbers in the header or footer.
  • Click generate to render your HTML into a formatted PDF file with your chosen pagination settings.

Use Cases

Generating academic papers or thesis documents with Roman numeral pagination for preliminary pages.
Creating multi-chapter technical manuals where each page includes the chapter number for easier navigation.
Producing professional business reports with branded headers and consistent footer page numbering.

Examples

1. Professional Quarterly Report

Business Analyst
Background
The analyst needs to convert a quarterly performance summary into a formal PDF document.
Problem
The document requires a clean, professional look with page numbers in the bottom right corner and a total page count.
How to Use
Input the report HTML, select 'Arabic' numbering, enable 'Include Total Pages', and set the position to 'footer-right'.
Example Config
numberingStyle: 'arabic', includeTotalPages: true, numberPosition: 'footer-right'
Outcome
A polished PDF report with 'Page X of Y' displayed in the bottom right corner of every page.

2. Technical Documentation Manual

Technical Writer
Background
A technical manual is being compiled from several separate HTML files.
Problem
The writer needs to ensure each section is clearly identified by chapter number in the page footer.
How to Use
Set the numbering style to 'chapter-prefix', define the chapter number, and use the template 'Chapter {chapter} - Page '.
Example Config
numberingStyle: 'chapter-prefix', chapterNumber: 1, chapterPrefixTemplate: 'Chapter {chapter} - Page '
Outcome
A PDF where every page footer displays the specific chapter context, such as 'Chapter 1 - Page 5'.

Try with Samples

html, pdf

Related Hubs

FAQ

Can I use Roman numerals for page numbering?

Yes, you can select either uppercase or lowercase Roman numerals from the numbering style options.

How do I include the total page count?

Simply enable the 'Include Total Pages' checkbox to display the current page number alongside the total count.

Can I add a chapter prefix to my page numbers?

Yes, select the 'Chapter Prefix' style and use the template field to define your custom format, such as 'Chapter {chapter} - '.

Where can I place the page numbers?

You can position page numbers in the header or footer, with alignment options for left, center, or right.

Is it possible to start numbering from a page other than one?

Yes, you can set the 'Start Page Number' field to any integer to begin your pagination sequence from a specific value.

API Documentation

Request Endpoint

POST /en/api/tools/pdf-page-numbering-styles

Request Parameters

Parameter Name Type Required Description
htmlContent textarea Yes -
cssContent textarea No -
pageSize select No -
landscape checkbox No -
printBackground checkbox No -
marginTop number No -
marginBottom number No -
marginLeft number No -
marginRight number No -
numberingStyle select No -
startPageNumber number No -
includeTotalPages checkbox No -
chapterPrefixTemplate text No -
chapterNumber number No -
labelPrefix text No -
labelSuffix text No -
numberPosition select No -
edgeOffsetMm number No -
fontSize number No -
fontColor color No -
waitUntil select No -
waitTime number No -

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-pdf-page-numbering-styles": {
      "name": "pdf-page-numbering-styles",
      "description": "Convert HTML to PDF with Roman, Arabic, or chapter-prefixed page numbers",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=pdf-page-numbering-styles",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]