BlazorBlueprint.PdfViewer
1.0.0
dotnet add package BlazorBlueprint.PdfViewer --version 1.0.0
NuGet\Install-Package BlazorBlueprint.PdfViewer -Version 1.0.0
<PackageReference Include="BlazorBlueprint.PdfViewer" Version="1.0.0" />
<PackageVersion Include="BlazorBlueprint.PdfViewer" Version="1.0.0" />
<PackageReference Include="BlazorBlueprint.PdfViewer" />
paket add BlazorBlueprint.PdfViewer --version 1.0.0
#r "nuget: BlazorBlueprint.PdfViewer, 1.0.0"
#:package BlazorBlueprint.PdfViewer@1.0.0
#addin nuget:?package=BlazorBlueprint.PdfViewer&version=1.0.0
#tool nuget:?package=BlazorBlueprint.PdfViewer&version=1.0.0
BlazorBlueprint.PdfViewer
A PDF viewer for Blazor, built on PDF.js: paging, zoom, fit-to-width and download, from a URL or from bytes your app already holds. It works in Server, WebAssembly and Auto render modes.
It is an add-on to BlazorBlueprint.Components, in a package of its own because PDF.js is over 2 MB of script and WebAssembly. Apps that don't show PDFs don't carry it.
Install
dotnet add package BlazorBlueprint.PdfViewer
Set up BlazorBlueprint.Components first, then add the viewer's stylesheet after
blazorblueprint.css in App.razor (or index.html):
<link href="_content/BlazorBlueprint.Components/blazorblueprint.css" rel="stylesheet" />
<link href="_content/BlazorBlueprint.PdfViewer/blazorblueprint-pdfviewer.css" rel="stylesheet" />
And the namespace in _Imports.razor:
@using BlazorBlueprint.PdfViewer
Use
<BbPdfViewer Url="/files/report.pdf" Height="600px" />
Documents can also come from bytes, with no URL or request at all:
<BbPdfViewer @ref="viewer" Height="600px" />
@code {
private BbPdfViewer? viewer;
private async Task ShowAsync(byte[] pdf) => await viewer!.LoadDataAsync(pdf);
}
Localization
The viewer's strings use the PdfViewer. keys through BlazorBlueprint's IBbLocalizer, with
English defaults in PdfViewerLocalization.Defaults:
builder.Services.AddBlazorBlueprintComponents(localizer =>
{
localizer.Set("PdfViewer.NextPage", "Page suivante");
});
Licenses
BlazorBlueprint.PdfViewer is Apache-2.0. It bundles PDF.js (Apache-2.0) and PDF.js's image
decoders (OpenJPEG BSD-2-Clause, PDFium JBIG2 BSD-3-Clause, qcms MIT); their notices ship in
wwwroot/THIRD-PARTY-NOTICES.txt.
| 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
- BlazorBlueprint.Components (>= 4.2.0)
- Microsoft.AspNetCore.Components.Web (>= 10.0.14)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 47 | 11/7/2026 |