BlazorBlueprint.PdfViewer 1.0.0

dotnet add package BlazorBlueprint.PdfViewer --version 1.0.0
                    
NuGet\Install-Package BlazorBlueprint.PdfViewer -Version 1.0.0
                    
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="BlazorBlueprint.PdfViewer" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazorBlueprint.PdfViewer" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="BlazorBlueprint.PdfViewer" />
                    
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 BlazorBlueprint.PdfViewer --version 1.0.0
                    
#r "nuget: BlazorBlueprint.PdfViewer, 1.0.0"
                    
#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 BlazorBlueprint.PdfViewer@1.0.0
                    
#: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=BlazorBlueprint.PdfViewer&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=BlazorBlueprint.PdfViewer&version=1.0.0
                    
Install as a Cake Tool

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

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