Broadside.Viewer
1.0.0-rc.1
dotnet add package Broadside.Viewer --version 1.0.0-rc.1
NuGet\Install-Package Broadside.Viewer -Version 1.0.0-rc.1
<PackageReference Include="Broadside.Viewer" Version="1.0.0-rc.1" />
<PackageVersion Include="Broadside.Viewer" Version="1.0.0-rc.1" />
<PackageReference Include="Broadside.Viewer" />
paket add Broadside.Viewer --version 1.0.0-rc.1
#r "nuget: Broadside.Viewer, 1.0.0-rc.1"
#:package Broadside.Viewer@1.0.0-rc.1
#addin nuget:?package=Broadside.Viewer&version=1.0.0-rc.1&prerelease
#tool nuget:?package=Broadside.Viewer&version=1.0.0-rc.1&prerelease
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.
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 at its 1.0 release candidate; 1.0.0 follows once the owner is satisfied it is ready. The API is frozen for 1.0: only fixes land between now and 1.0.0. Every package, the viewers included, ships as 1.0.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. Until 1.0.0 is out the packages are release candidates, 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 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.
1.0 release candidate: the API is frozen, every part of the library has a guide, the security review is done, and the performance comparison with PDFium and pdf.js is published. 1.0.0 follows once the owner is satisfied it is ready (notes on getting to 1.0.0).
After 1.0: migration guides from PdfSharp, iText and PdfPig, 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
| Product | Versions 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. |
-
net10.0
- Broadside (>= 1.0.0-rc.1)
- Broadside.Rendering (>= 1.0.0-rc.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
- System.Security.Cryptography.Pkcs (>= 10.0.13)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Broadside.Viewer:
| Package | Downloads |
|---|---|
|
Broadside.Viewer.Blazor
The Blazor WebAssembly shell for the Broadside viewer: a PdfViewer component that renders tiles with the managed software rasterizer (or, as an option, with WebGL 2 through Broadside.Rendering.WebGL) into a canvas, opens remote files through HTTP range requests (first page first), and wires the viewer core's input model, text selection, annotation layer and accessibility bridge to the DOM. No native assets and no third-party JavaScript; trimmable and AOT-compatible. Runs in the browser only. |
|
|
Broadside.Viewer.Uno
Uno Platform viewer for Broadside: a PdfView control on the shared viewer core for Uno's desktop (Skia) and WebAssembly heads, with tiles, touch, mouse and keyboard input, text selection, search, smart dark mode and automation peers. Depends on Uno.WinUI. |
|
|
Broadside.Viewer.Avalonia
Avalonia viewer for Broadside: a PdfView control on the shared viewer core for Windows, macOS and Linux, with tiles rendered off the UI thread, touch, mouse and keyboard input, text selection, search, annotation and link layers, dark mode and automation peers that expose page text in reading order. Depends on Avalonia only. |
|
|
Broadside.Viewer.Wpf
WPF viewer for Broadside: a PdfView control on the shared viewer core. Tiles render off the UI thread with the fully managed software rasterizer and are composed as frozen bitmaps; mouse, touch, pen and keyboard input, text selection, links, form fields, find-in-document, smart dark mode and UI Automation (pages, their text in reading order, and the tagged structure). Depends on WPF only. |
|
|
Broadside.Viewer.WinUI
WinUI 3 viewer for Broadside: a PdfView control on the shared viewer core, with tiles rendered off the UI thread, pointer, pen, touch and keyboard input, text selection, search, dark mode, form filling and UI Automation peers that expose page text in reading order. Depends on the Windows App SDK. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-rc.1 | 128 | 11/26/2026 |
| 0.1.0-preview.10 | 5,042 | 11/19/2026 |
| 0.1.0-preview.9 | 112 | 11/19/2026 |
| 0.1.0-preview.8 | 122 | 11/17/2026 |
| 0.1.0-preview.7 | 99 | 11/14/2026 |
| 0.1.0-preview.6 | 94 | 11/13/2026 |
| 0.1.0-preview.5 | 84 | 11/9/2026 |
| 0.1.0-preview.4 | 103 | 10/26/2026 |
| 0.1.0-preview.3 | 102 | 10/25/2026 |
| 0.1.0-preview.2 | 108 | 10/23/2026 |
| 0.1.0-preview.1 | 86 | 10/21/2026 |