IRONSOFTWAREHOME
Attach a Cover Page
using IronPdf;

// Instantiate renderer
var renderer = new ChromePdfRenderer();

/* Cover Page */
// Create a sample cover using the RenderHtmlAsPdf method
var cover = renderer.RenderHtmlAsPdf("<h1>This is a 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;

// Download from a URL & convert to PDF in just one line!
var pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf/");

// Only ONE line to combine two PDFs.
pdf.InsertPdf(cover, 0).SaveAs("combined.pdf");
Imports IronPdf

' Instantiate renderer
Dim renderer = New ChromePdfRenderer()

' Cover Page
' Create a sample cover using the RenderHtmlAsPdf method
Dim cover = renderer.RenderHtmlAsPdf("<h1>This is a 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

' Download from a URL & convert to PDF in just one line!
Dim pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf/")

' Only ONE line to combine two PDFs.
pdf.InsertPdf(cover, 0).SaveAs("combined.pdf")
NuGet Download
PM > Install-Package IronPdf
Attach a Cover Page

Attach a Cover Page

When working with PDF documents, adding a cover page provides a method for increasing the visual appeal of the PDF itself. It gives developers like yourself a space to add branding to the PDF, or simply attract more readers with a cover page that stands out. IronPDF makes it easy to add cover pages to your PDFs in just a couple of lines of code, thanks to its merge tool.

5 Steps to Adding Cover Pages to Your PDFs

For today's example, we will be converting an HTML string to PDF; however, you can load in an existing PDF document that contains the cover page you want to attach to your PDF file. To do this, we must create a new ChromePdfRenderer object. This class handles HTML to PDF conversion, allowing you to render pixel-perfect PDF documents from HTML, CSS, and JavaScript content.

Then, we create our cover page by rendering our HTML string to PDF format using RenderHtmlAsPdf. If you're working with a pre-existing PDF document as your cover, you would need to load in your PDF using PdfDocument.FromFile. Next, we configure the renderer with custom rendering options. We set the first-page number to 2, which ensures that when we render our main PDF document, the page numbering will start at 2 instead of the default (1).

Next, we need to render our main PDF. Here, we are rendering web content from a URL into a PDF document. At this point, we have two PDF objects, one containing our PDF cover and the second containing our PDF from the URL.

Now, it's time to attach our cover page to our core PDF document. We can do this in just one easy line of code. InsertPdf(cover, 0) inserts the cover PDF at page index 0, which is the beginning of the PDF document. Now, the pdf object is one PDF document that contains the cover page and the URL content. Then, using SaveAs, we save the final merged PDF document to the specified file location.

Learn to Create a Table of Contents in Your PDFs
View on GitHub

Ready to Get Started?

Nuget Downloads 21,105,021Version: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
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"

Licenses from $999