MudBlazor Quickstart

Grab the latest package from nuget.org

dotnet add package Gotho.BlazorPdf.MudBlazor

Configuration

Add the following to your application startup in Program.cs

builder.Services.AddBlazorPdfViewer();

Update your App.razor file to import the required CSS.

<link href="_content/Gotho.BlazorPdf.MudBlazor/blazorpdf_mudblazor.min.css" rel="stylesheet"/>

Then, add the namespace to your _Imports.razor file.

@using Gotho.BlazorPdf.MudBlazor;

You should now be able to use Blazor PDF in your Project! 🚀

Usage

Below is a basic example of the minimum required code in order to display a PDF document. See the rest of the documentation for full configuration options.

<MudPdfViewer Url="https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf"/>
An unhandled error has occurred. Reload 🗙