Skip to footer content

Create PDFs

Create PDFs from scratch using our powerful and intuitive document building API.

Icon Main related to Create PDFs
Design Your Perfect PDF

1

Create Blank PDF

Create a brand-new PDF from scratch! Start with a blank canvas and build the document you need with complete control. Whether you're building a new report, designing an invoice, or drafting a proposal, start from scratch or use a template for faster results.

Learn how to:Create a blank PDF
using IronPdf;

PdfDocument pdf = new PdfDocument(270, 270);

pdf.SaveAs("blankPage.pdf");
C#
2

Add Texts & Images

Insert custom text and images into your PDF documents seamlessly. IronPDF gives you full control over placement, alignment, and opacity of elements, along with the flexibility to manage headers and text positioning across different pages.

Learn how to:add texts & images
using IronPdf;
using IronSoftware.Drawing;

ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>testing</h1>");

// Draw text on PDF
pdf.DrawText("Some text", FontTypes.TimesNewRoman.Name, FontSize: 12, PageIndex: 0, X: 100, Y: 100, Color.Black, Rotation: 0);

// Open image file
AnyBitmap bitmap = AnyBitmap.FromFile("ironSoftware.png");
// Draw the bitmp on PDF
pdf.DrawBitmap(bitmap, 0, 50, 250, 500, 300);
C#
3

Add Shapes

Choose from a wide range of shapes to add to your PDF documents. Whether for diagramming, highlighting sections, or adding visual elements, the shape library lets you enhance the aesthetics and readability of your PDFs.

Learn how to:add shapes
using IronPdf;

ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>testing</h1>");

// Configure the required parameters
int pageIndex = 0;
var rectangle = new IronSoftware.Drawing.RectangleF(200, 100, 1000, 100);
var lineColor = new IronSoftware.Drawing.Color("#000000");
var fillColor = new IronSoftware.Drawing.Color("#32AB90");
int lineWidth = 5;

// Draw rectangle on PDF
pdf.DrawRectangle(pageIndex, rectangle, lineColor, fillColor, lineWidth);
C#
4

Add Headers/Footers

Easily insert text-based or HTML-formatted headers and footers into your PDF for a professional look. Customize alignment, add watermarks, adjust fonts, and more. This feature is ideal for adding consistent branding elements across pages.

Learn how to:add headers/footers
using IronPdf;

// Instantiate renderer and create PDF
ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Hello World!</h1>");

// Create text header
TextHeaderFooter textHeader = new TextHeaderFooter
{   CenterText = "This is the header!",    };

// Create text footer
TextHeaderFooter textFooter = new TextHeaderFooter
{    CenterText = "This is the footer!",   };

// Add text header and footer to the PDF
pdf.AddTextHeaders(textHeader);
pdf.AddTextFooters(textFooter);

pdf.SaveAs("addTextHeaderFooter.pdf");
C#
5

Add Page Numbers

Simplify page numbering in your PDFs with IronPDF's automated page numbering capabilities. Insert page numbers at any location on the page and maintain consistent styling throughout your document.

Learn how to:add page numbers
using IronPdf;

// Create text header
TextHeaderFooter textHeader = new TextHeaderFooter()
{   CenterText = "{page} of {total-pages}"   };
// Render a new PDF
ChromePdfRenderer renderer = new ChromePdfRenderer();

PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Hello World!</h1>");

// Add header
pdf.AddTextHeaders(textHeader);
C#

Icon Main related to Create PDFs
Make Full PDF Customization Easy

1

Orientation

Manage the orientation of your PDFs effortlessly. Switch between Portrait and Landscape modes and rotate your pages by 90 or 180 degrees as needed, perfect for wide-format documents or presentations.

Learn how to:orientate PDFs
using IronPdf;
using IronPdf.Rendering;

ChromePdfRenderer renderer = new ChromePdfRenderer();

// Change paper orientation
renderer.RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape;

PdfDocument pdf = renderer.RenderUrlAsPdf("https://en.wikipedia.org/wiki/Main_Page");
pdf.SaveAs("landscape.pdf");
C#
2

Custom Paper Size

Support for all standard paper sizes like A4, Letter, and more. Additionally, define custom paper sizes using points, inches, or pixels to match unique requirements, such as posters, receipts, or website snapshots.

Learn how to:customize paper size
using IronPdf;

ChromePdfRenderer renderer = new ChromePdfRenderer();

// Set custom paper size in cm
renderer.RenderingOptions.SetCustomPaperSizeinCentimeters(15, 15);

PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Custom Paper Size</h1>");
pdf.SaveAs("customPaperSize.pdf");
C#
3

Set PDF Metadata

Easily set or modify the metadata of your PDFs. This includes title, author, keywords, and other attributes to enhance document organization and search ability.

Learn how to:set PDF Metadata
using IronPdf;
using System;

ChromePdfRenderer renderer = new ChromePdfRenderer();

PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Metadata</h1>");

// Access the MetaData class and set the pre-defined metadata properties.
pdf.MetaData.Author = "Iron Software";
pdf.MetaData.CreationDate = DateTime.Today;
pdf.MetaData.Creator = "IronPDF";

pdf.SaveAs("pdf-with-metadata.pdf");
C#

Icon Main related to Create PDFs
Enhance PDF Standard, Accessibility, And Compliance

1

PDF 1.2 to PDF 1.7

IronPDF fully supports creating and editing PDFs in versions ranging from 1.2 to 1.7, ensuring compatibility with a variety of PDF readers and platforms.

Learn how to:PDF 1.2 to PDF 1.7
using IronPdf;

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

// Render simple HTML to PDF
var pdf = renderer.RenderHtmlAsPdf("<p> Hello World!</p>");

// Save as PDF file, IronPDF autmoatically output to the PDF 1.4 standard version
pdf.SaveAs("output.pdf");
C#
2

PDF/UA

Create and export PDFs that are compliant with PDF/UA standards to meet universal accessibility guidelines, enabling documents to be more accessible for users with disabilities.

Learn how to:comply with PDF/UA standards
using IronPdf;

// Open PDF File
PdfDocument pdf = PdfDocument.FromFile("wikipedia.pdf");

// Export as PDF/UA compliance PDF
pdf.SaveAsPdfUA("pdf-ua-wikipedia.pdf");
C#
3

PDF/A

Generate PDF/A-compliant documents that meet archiving standards, ensuring the longevity and integrity of your files for long-term preservation.

Iron Software is a member of the PDF Association.

Learn how to:comply with PDF/A standards
using IronPdf;

// Create a PdfDocument object or open any PDF File
PdfDocument pdf = PdfDocument.FromFile("wikipedia.pdf");

// Use the SaveAsPdfA method to save to file
pdf.SaveAsPdfA("pdf-a3-wikipedia.pdf", PdfAVersions.PdfA3b);
C#

Icon Main related to Create PDFs
Hassle-Free PDF Viewing and Printing

1

IronPdf Viewer

Embed PDF viewing capabilities directly into your MAUI applications, allowing users to view documents without leaving your app environment. This feature is perfect for creating interactive applications with integrated document management.

Learn how to:embed PDF viewing
using IronPdf.Viewer.Maui;

public class MainPage : ContentPage
{
    private readonly IronPdfView pdfView;

    public MainPage()
    {
        InitializeComponent();

        this.pdfView = new IronPdfView { Options = IronPdfViewOptions.All };

        Content = this.pdfView;
    }
}
C#
Ready to Get Started?
Nuget Downloads 16,315,602 | Version: 2025.11 just released