How to Create Different PDF Versions in C

A PDF can contain a wide array of elements, ranging from simple text and images to more complex features such as interactive forms, layered designs, and 3D models. The version of a PDF is directly determined by the features it includes; for example, a document with transparency requires at least version 1.4, while one with layers needs version 1.5. This article will demonstrate how IronPDF automatically manages this complexity, selecting the correct PDF version during conversion to provide a seamless and hassle-free experience.


PDF Version 1.4 Example

IronPDF supports all PDF versions ranging from 1.2 to 1.7. When converting from HTML to PDF, IronPDF automatically selects the lowest version offered by the Chromium engine, ranging from PDF 1.4 to PDF 1.6, to increase compatibility with other viewers.

As such, the version for many conversions is PDF 1.4. PDF 1.4 features include transparency, enabling modern graphic designs while maintaining broad compatibility with most viewers. In this example, we'll perform a simple conversion of an HTML string to a PDF using IronPDF to showcase this behavior.

Code Example

:path=/static-assets/pdf/content-code-examples/how-to/pdf-version-standard.cs
using IronPdf;

var renderer = new ChromePdfRenderer();

var pdf = renderer.RenderHtmlAsPdf("<p> Hello World!</p>");

pdf.SaveAs("output.pdf");
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

Output

PDF version 1.4

As you can see from the version, IronPDF chose the lowest version from the range (PDF 1.4) to ensure compatibility with other viewers.


PDF Version 1.7 Example

IronPDF automatically generates a PDF 1.7 (the international standard) file when merging documents to ensure maximum compatibility with all PDF viewers. Since the source PDFs may use different versions and features, defaulting to the comprehensive 1.7 standard ensures that all original elements are preserved without losing data or functionality.

Code Example

:path=/static-assets/pdf/content-code-examples/how-to/merge-or-split-pdfs-merge.cs
using IronPdf;

// Two paged PDF
const string html_a =
    @"<p> [PDF_A] </p>
    <p> [PDF_A] 1st Page </p>
    <div style = 'page-break-after: always;' ></div>
    <p> [PDF_A] 2nd Page</p>";

// Two paged PDF
const string html_b =
    @"<p> [PDF_B] </p>
    <p> [PDF_B] 1st Page </p>
    <div style = 'page-break-after: always;' ></div>
    <p> [PDF_B] 2nd Page</p>";

var renderer = new ChromePdfRenderer();

var pdfdoc_a = renderer.RenderHtmlAsPdf(html_a);
var pdfdoc_b = renderer.RenderHtmlAsPdf(html_b);

// Four paged PDF
var merged = PdfDocument.Merge(pdfdoc_a, pdfdoc_b);
merged.SaveAs("Merged.pdf");
Imports IronPdf

' Two paged PDF
Private Const html_a As String = "<p> [PDF_A] </p>
    <p> [PDF_A] 1st Page </p>
    <div style = 'page-break-after: always;' ></div>
    <p> [PDF_A] 2nd Page</p>"

' Two paged PDF
Private Const html_b As String = "<p> [PDF_B] </p>
    <p> [PDF_B] 1st Page </p>
    <div style = 'page-break-after: always;' ></div>
    <p> [PDF_B] 2nd Page</p>"

Private renderer = New ChromePdfRenderer()

Private pdfdoc_a = renderer.RenderHtmlAsPdf(html_a)
Private pdfdoc_b = renderer.RenderHtmlAsPdf(html_b)

' Four paged PDF
Private merged = PdfDocument.Merge(pdfdoc_a, pdfdoc_b)
merged.SaveAs("Merged.pdf")
$vbLabelText   $csharpLabel

Output

PDF version 1.7

As you can see from the version, IronPDF generated a 1.7 version PDF by merging the two PDFs.

Frequently Asked Questions

What determines the version of a PDF?

The version of a PDF is determined by the features it includes. For example, a document with transparency requires at least version 1.4, while one with layers needs version 1.5.

How does IronPDF handle different PDF versions automatically?

IronPDF automatically selects the correct PDF version during conversion to ensure compatibility and maintain document integrity. It chooses the lowest version offered by the Chromium engine, typically ranging from PDF 1.4 to PDF 1.6, to support broad compatibility.

What is the process for creating different PDF versions using IronPDF?

To create different PDF versions with IronPDF, download the library from NuGet, instantiate ChromePdfRender, use the RenderHtmlAsPdf method to render HTML, save and export the PDF, and verify the version of the new PDF.

What PDF versions does IronPDF support?

IronPDF supports all PDF versions ranging from 1.2 to 1.7, ensuring it can handle various document features and levels of complexity.

Why does IronPDF often select PDF version 1.4 during conversions?

IronPDF often selects PDF version 1.4 during conversions to increase compatibility with most PDF viewers. This version supports features like transparency, allowing modern graphic designs while maintaining broad compatibility.

When does IronPDF generate a PDF 1.7 version?

IronPDF generates a PDF 1.7 version when merging documents to ensure maximum compatibility with all PDF viewers. This version preserves all original elements without losing data or functionality.

What advantages does PDF version 1.7 offer?

PDF version 1.7 offers the advantage of being the international standard, ensuring full compatibility with all PDF viewers and supporting a wide array of document features.

How does IronPDF ensure document integrity when merging PDFs?

IronPDF ensures document integrity when merging PDFs by defaulting to the PDF 1.7 standard, which supports comprehensive features and maintains the integrity of all original elements across different source PDFs.

Can IronPDF convert HTML to PDF while selecting the appropriate version?

Yes, IronPDF can convert HTML to PDF and automatically select the appropriate version based on the features used in the document, ensuring compatibility and functionality.

Does IronPDF require manual selection of PDF versions during document creation?

No, IronPDF does not require manual selection of PDF versions. It automatically determines and selects the appropriate version during the document conversion process.

Is IronPDF fully compatible with .NET 10 when exporting different PDF versions?

Yes, IronPDF supports .NET 10 fully and works out-of-the-box for exporting PDFs with different versions. You can use IronPDF in .NET 10 projects (console, web, desktop, or MAUI), and the version-selection behavior (e.g. defaulting to PDF 1.4 for simple documents, or PDF 1.7 when merging) behaves the same as in earlier supported frameworks.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More
Ready to Get Started?
Nuget Downloads 16,244,136 | Version: 2025.11 just released