Skip to content

tgothorp/Gotho.BlazorPdf

Repository files navigation

Blazor PDF (Formally Mud PDF)

MudPDF

Originally a port of the BlazorBootstrap PDF viewer for the MudBlazor component library. Blazor PDF is a simple yet powerful PDF viewer for Blazor framework.

NuGet Version NuGet Downloads GitHub License

Contents

Installation

Grab the package from nuget.org;

dotnet add package Gotho.BlazorPdf

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/blazorpdf.min.css" rel="stylesheet"/>

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

@using Gotho.BlazorPdf

You should now be fully setup to use the PdfViewer component in your code!

Prerequisites

In order to use this package, your project will need to be configured with the following;

  • .NET Version 8.0 or 9.0

Usage & Examples

Please see the documentation site for detailed examples

MudBlazor Integration

This project was previously known as MudPdf / MudBlazor.PdfViewer. This repo was updated and renamed to remove the MudBlazor dependency such that the library can be used by any Blazor project.

However, in keeping with the original spirit of this project, a separate, dedicated package for MudBlazor is available.

See the documentation website for installation & usage details.

Contributing

Feel free to make contributions, see the CONTRIBUTING.md file for more information.

Icons

This project uses the excellent feather icons icon library.

License

Licensed under Apache-2.0

This library contains code from the PdfViewer Blazor component provided by the Blazor Bootstrap component library which is licensed under the Apache 2.0 license.

See NOTICE.md for more information.