IRONSOFTWAREHOME
Attach a Cover Page
from ironpdf import *

# Instantiate Renderer
renderer = ChromePdfRenderer()
 
""" Cover Page """
# Created Sample Cover using RenderHtmlAsPdf method
cover = renderer.RenderHtmlAsPdf("<h1> This is Cover Page</h1>")
 
""" Main Document """
# As we have a Cover Page, we're going to start the page numbers at 2.
renderer.RenderingOptions.FirstPageNumber = 2
 
# Set up headers and footers
# ...not included in the example
 
# Downloaded & Converted to PDF in Just One Line!
pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf/")
 
# Only ONE Line command to merge two PDFs.
PdfDocument.Merge(cover, pdf).SaveAs("combined.pdf")
pip install ironpdf
Attach a Cover Page

Attach a Cover Page

IronPDF for Python makes it straightforward to prepend a custom cover page to any PDF document, creating professionally structured reports and documents.

Getting Started

Render two separate PDFs - one for the cover and one for the main content - then merge them into a single document using PdfDocument.Merge. Set FirstPageNumber = 2 on the main content renderer so that page numbers begin at 2, accounting for the cover page.

Understanding the Code

  • renderer.RenderHtmlAsPdf(html): Renders the cover page HTML as a standalone PdfDocument.
  • FirstPageNumber = 2: Tells IronPDF that the first page of the main content should be numbered 2. This is important when a footer or header includes {page} merge fields.
  • renderer.RenderUrlAsPdf(url): Renders the main document content from a URL.
  • PdfDocument.Merge(cover, pdf): Combines the cover page PDF with the main document PDF, placing the cover first. Returns a new merged PdfDocument.
  • SaveAs("combined.pdf"): Saves the merged document to disk.

Customizing the Cover Page

The cover page HTML can include any content - company logo, document title, author, date, and formatting. Use the same ChromePdfRenderer with its full range of rendering options (fonts, margins, backgrounds) to style the cover page.

Learn to create and merge PDF documents with IronPDF for Python!

Ready to Get Started?

Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

OR
bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried Iron Suite
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required
Python Module Download for PDF
Install with pip

Version: 2026.9

  1. Download and install Python 3.7+.
  2. Install pip from pypi.org if it isn't installed already.
  3. Execute the above command in the terminal.
Python PDF Module
Download Module

Version: 2026.9

Manually install into your project

  1. Download the package
  2. Run this command from the terminal
    pip install ironpdf-2026.9-py37-none-win_amd64.whi

Licenses from $999