IRONSOFTWAREHOME
USE CASES

How to Set the PDF Version for Compatibility in C#

Curtis Chau
Curtis Chau
Updated: July 5, 2026

The PDF format has several versions, and the one a file uses affects which readers can open it and which features it can carry. Picking the right version by hand is fiddly and easy to get wrong, especially when documents go to recipients whose software you cannot predict. IronPDF removes that decision: it selects the PDF version automatically based on what each document contains, so output stays compatible without any version-handling code.

The Business Problem

A billing system emails invoices to customers using everything from current desktop readers to old Acrobat installs, mobile apps, and browser viewers. A document service merges files that were created at different PDF versions. A high-volume pipeline generates thousands of simple statements where size and speed matter. In each case, choosing a version manually adds work and risk, and the wrong choice means a file that fails to open or a feature that silently disappears.

How It Works

For a simple HTML conversion, IronPDF outputs a widely supported version, which keeps the file readable across the broadest range of viewers.

using IronPdf;

var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf("<p>Hello World!</p>");
pdf.SaveAs("output.pdf");
C#

When documents are merged, IronPDF outputs PDF 1.7, the ISO 32000-1 standard, so advanced features from any source file are preserved rather than downgraded.

var a = renderer.RenderHtmlAsPdf(htmlA);
var b = renderer.RenderHtmlAsPdf(htmlB);

var merged = PdfDocument.Merge(a, b);
merged.SaveAs("merged.pdf");
C#

If a document uses features that need a higher version, such as JavaScript, interactive forms, layers, or advanced security, IronPDF raises the version to support them, so the feature works in the output instead of being dropped.

Points to Plan For

  • Automatic, not a manual switch: Version selection is handled for you based on content. The practical developer action is verifying the resulting version when compatibility is critical, which the file's document properties show.
  • Simple versus merged: Most basic conversions produce a broadly compatible version, while merges produce 1.7 to preserve every source feature.
  • Size and speed: Lower-version output for simple documents is generally smaller and faster to process, which helps high-volume pipelines.
  • Version is not PDF/A: Long-term archival compliance is a separate standard with its own requirements. Producing a 1.7 file does not make it archival-compliant.

Result

By letting IronPDF choose the version, teams ship PDFs that open reliably for unpredictable recipients and merge documents without losing features, with no version logic to maintain. Full selection details are in the PDF versions guide.

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

Related Articles

Key in blue circle

Get your free 30-day Trial Key instantly.

No limitations. 100% unlocked. No credit card.

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 IronPDF
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