Broadside 0.1.0-preview.10

This is a prerelease version of Broadside.
dotnet add package Broadside --version 0.1.0-preview.10
                    
NuGet\Install-Package Broadside -Version 0.1.0-preview.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Broadside" Version="0.1.0-preview.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Broadside" Version="0.1.0-preview.10" />
                    
Directory.Packages.props
<PackageReference Include="Broadside" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Broadside --version 0.1.0-preview.10
                    
#r "nuget: Broadside, 0.1.0-preview.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Broadside@0.1.0-preview.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Broadside&version=0.1.0-preview.10&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Broadside&version=0.1.0-preview.10&prerelease
                    
Install as a Cake Tool

Broadside

A PDF library for .NET, written entirely in C#. Read, create, edit, sign and render PDF files, and show them in your app with a ready-made viewer.

NuGet License: MIT

Try the live demo. It runs in your browser, on a phone too. Open a PDF, search it, fill in its form, add notes, or create a new document.

Broadside is in preview. It's tested and on NuGet, but the API can still change between versions until 1.0.

Why Broadside

  • One dependency. Reading, writing, editing, rendering, text extraction, forms and signatures are all in one place.
  • No native code. Everything is C#, so it runs anywhere .NET runs, including the browser, and trims well for small apps.
  • Opens broken files. Damaged PDFs are repaired when they're opened, and you get a list of what was fixed.
  • Follows the standard. Built on PDF 2.0 (ISO 32000-2), and it reads older PDF versions too.
  • Free. MIT licensed, for commercial use as well.

What it can do

Read Open files from disk, memory or a URL (only the parts needed are downloaded). Encrypted files, password-protected files, and files that are damaged or incomplete.
Create Draw text, shapes and images on a page, or build whole documents (headings, paragraphs, tables, images, headers and footers, a table of contents) from a few lines of C#. Fonts are embedded and subset automatically.
Edit Add, remove and reorder pages, merge and split files, fill in and flatten forms, add annotations, and encrypt on save.
Render Turn pages into images, with a built-in renderer or through SkiaSharp, Direct2D, CoreGraphics, Android or WebGL.
Extract Get the text of a page in reading order, with words, lines and their positions.
Sign Sign documents and check existing signatures.
Accessibility and archiving Create accessible (PDF/UA) and archival (PDF/A) documents, and add tags to untagged files.
Images and fonts JPEG, JPEG 2000, JBIG2, CCITT fax and the other image formats PDF uses. TrueType, OpenType, Type 1 and Type 3 fonts.

Broadside reads JavaScript, 3D content, video and XFA forms and keeps them when it saves the file, but doesn't run or display them.

Install

Broadside needs .NET 10. All packages are previews, so add --prerelease:

dotnet add package Broadside --prerelease                    # read, write and edit
dotnet add package Broadside.Rendering --prerelease          # render pages to images
dotnet add package Broadside.Fonts.Standard14 --prerelease   # the 14 standard PDF fonts (Helvetica, Times, Courier...)
dotnet add package Broadside.Layout --prerelease             # build documents from paragraphs and tables

Quick start

Create a PDF, read it back, and save page 1 as an image:

using Broadside;
using Broadside.Fonts;
using Broadside.Graphics;
using Broadside.Rendering;

// Write: a new document with one page of text.
using (PdfDocument created = PdfDocument.Create())
{
    PdfPage page = created.Pages[0]; // Create() starts with one empty US Letter page
    PdfCanvasFont helvetica = created.GetStandard14Font(Standard14Font.Helvetica);
    using (PdfCanvas canvas = page.CreateCanvas())
    {
        canvas.BeginText();
        canvas.SetFont(helvetica, 24);
        canvas.MoveText(72, 700);
        canvas.ShowText("Hello from Broadside");
        canvas.EndText();
    }

    created.Save("hello.pdf");
}

// Read: open a file (lenient by default), list what was repaired, extract text.
PdfOptions options = new PdfOptions().UseStandard14Fonts();
using PdfDocument document = PdfDocument.Open("hello.pdf", options);
foreach (Broadside.Diagnostics.Diagnostic diagnostic in document.Diagnostics)
{
    Console.WriteLine(diagnostic);
}

Console.WriteLine($"{document.Pages.Count} page(s)");
Console.WriteLine(document.Pages[0].ExtractText().Text);

// Render: page 1 to a PNG with the software rasterizer.
using var rasterizer = new SoftwareRasterizer();
using (Bitmap bitmap = rasterizer.Render(document.Pages[0], new RenderOptions().WithDpi(150)))
using (FileStream png = File.Create("page-1.png"))
{
    bitmap.SavePng(png);
}

Build a document

The document builder lays out content for you and produces an accessible, tagged PDF:

using Broadside;
using Broadside.Layout.Flow;

using PdfDocument pdf = PdfDocument.Create(doc => doc
    .WithTitle("Hello")
    .WithLanguage("en-US")
    .Content(c =>
    {
        c.Heading(1, "Hello, Broadside");
        c.Paragraph("This page is tagged, embeds its font and opens in any reader.");
    }));

pdf.Save("hello.pdf");

Tables, images, columns, links, form fields and page numbers work the same way. The builder is still experimental, so turn off its warning with <NoWarn>$(NoWarn);BROADSIDE0001</NoWarn>. The building documents guide walks through more examples, and samples/Broadside.BuilderSamples has an invoice, a report and a form you can run.

Viewer controls

Drop a PDF viewer into your app. Every viewer scrolls and zooms smoothly, and supports text selection and copy, search, links, form filling, dark mode and screen readers.

Framework Package Runs on
Blazor WebAssembly Broadside.Viewer.Blazor Any modern browser, phones included
.NET MAUI Broadside.Viewer.Maui Android, iOS, Mac Catalyst, Windows
WPF Broadside.Viewer.Wpf Windows
WinUI 3 Broadside.Viewer.WinUI Windows
Avalonia Broadside.Viewer.Avalonia Windows, macOS, Linux
Uno Platform Broadside.Viewer.Uno Windows, macOS, Linux, browser

Blazor:

@using Broadside.Viewer.Blazor

<PdfViewer Source="@(new Uri("sample.pdf", UriKind.Relative))" Label="Sample document" />

Avalonia (WPF, WinUI and Uno work the same way):

<bs:PdfView xmlns:bs="using:Broadside.Viewer.Avalonia" Source="sample.pdf" />

For MAUI, call builder.UseBroadsideViewer() in MauiProgram, then add a PdfView and set its Source to a file path or URL.

Each viewer has a sample app in samples/.

Platforms

Platform Read, write, edit, render Native renderer Viewer
Windows Yes Direct2D, SkiaSharp WPF, WinUI, MAUI, Avalonia, Uno
macOS Yes CoreGraphics, SkiaSharp Avalonia, Uno
Linux Yes SkiaSharp Avalonia, Uno
iOS and Mac Catalyst Yes CoreGraphics, SkiaSharp MAUI
Android Yes Android Canvas, SkiaSharp MAUI
Browser (WebAssembly) Yes WebGL (optional) Blazor, Uno

The built-in renderer draws the same pixels on every platform, so a page looks identical everywhere. Windows, macOS, Linux, Android and the browser are tested automatically; iOS and Mac Catalyst are build-checked.

Packages

Package What it's for
Broadside Reading, writing, editing, text, forms, signatures
Broadside.Rendering The built-in renderer and PNG output
Broadside.Rendering.Skia Render with SkiaSharp
Broadside.Rendering.Direct2D Render with Direct2D on Windows
Broadside.Rendering.CoreGraphics Render with CoreGraphics on macOS, iOS and Mac Catalyst
Broadside.Rendering.Android Render with Android Canvas
Broadside.Rendering.WebGL Render with WebGL in the browser
Broadside.Fonts.Standard14 The 14 standard PDF fonts, for files that use them without embedding them
Broadside.Fonts.Cmaps Character maps for Chinese, Japanese and Korean text
Broadside.Layout The document builder
Broadside.Viewer The shared engine behind every viewer control
Broadside.Viewer.* The viewer controls listed above

Roadmap

Done. Reading, writing, editing, rendering, text extraction, forms, signatures, PDF/A and PDF/UA output, the document builder, and all six viewer controls.

Next, for 1.0:

  • Lock down the API so it stops changing between versions
  • Guides for every part of the library, and migration guides from PdfSharp, iText and PdfPig
  • A security review
  • A published performance comparison with PDFium and pdf.js

After 1.0: text shaping for more scripts (Indic, Thai and others), more form features, more signature types, and the less common parts of the PDF standard.

Documentation

Building from source

You need the .NET SDK version listed in global.json.

dotnet build Broadside.Core.slnf   # the main libraries; no extra workloads needed
dotnet test Broadside.Core.slnf
dotnet build Broadside.slnx        # everything, including the platform-specific projects your machine can build

The Apple and Android renderers need their .NET workloads (dotnet workload install maui). On a machine without them, those projects are skipped.

Contributing

Bug reports, ideas and pull requests are welcome. Start with CONTRIBUTING.md. To report a security problem, see SECURITY.md.

Sponsoring

Broadside is free and will stay free. Sponsors help fund the work and get priority on bugs and feature requests. See SPONSORS.md.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Broadside:

Package Downloads
Broadside.Rendering

The fully managed rendering layer for Broadside: the software rasterizer that every other backend is measured against, the ICC color engine and the PNG encoder. Consumes display lists produced by the core and has no native dependencies.

Broadside.Viewer

The framework-neutral viewer core for Broadside: a document session that opens a document, caches page geometry, builds display lists off the UI thread with cancellation and renders tiles onto a surface abstraction that each UI shell implements. References no UI framework and runs in the browser on a single thread.

Broadside.Fonts.Standard14

Glyph data for the Standard 14 fonts of Broadside: the Liberation 2.1.5 families (SIL Open Font License 1.1) standing in for Helvetica, Times and Courier, and the Foxit Symbol and Dingbats fonts from PDFium (BSD-3-Clause). Wire it in with options.UseStandard14Fonts() so pages that use non-embedded Standard 14 fonts render without system fonts. The metrics ship in the core; this package carries only the glyphs, unmodified. No native dependencies.

Broadside.Fonts.Cmaps

The Adobe predefined CMaps (the 59 of ISO 32000-2 Table 116 besides Identity-H/V) and the CID-to-Unicode tables of the Adobe CJK character collections for Broadside, used to map character codes to CIDs and Unicode for composite fonts that name a predefined CMap instead of embedding one. Wire it in with options.UsePredefinedCMaps(). The data is Adobe's cmap-resources and mapping-resources-pdf (BSD-3-Clause), unmodified. No native dependencies.

Broadside.Layout

Flow layout for Broadside: paragraphs broken into lines, aligned and justified, and flowed across pages of a set size and margins through the core's canvas API. A document builder describes documents as nested content in C# and lays them out through the flow engine. Depends only on the Broadside core and its Standard 14 font package. No native dependencies.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.10 155 11/19/2026
0.1.0-preview.9 121 11/19/2026
0.1.0-preview.8 141 11/17/2026
0.1.0-preview.7 136 11/14/2026
0.1.0-preview.6 132 11/13/2026
0.1.0-preview.5 118 11/9/2026
0.1.0-preview.4 138 10/26/2026
0.1.0-preview.3 131 10/25/2026
0.1.0-preview.2 147 10/23/2026
0.1.0-preview.1 131 10/21/2026