Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Append-IT/Blazor.Printing

Print PDF's using Blazor
https://github.com/Append-IT/Blazor.Printing

blazor pdf print

Last synced: 3 months ago
JSON representation

Print PDF's using Blazor

Awesome Lists containing this project

README

        

# Blazor Printing
Print and Save files in Blazor using the native dialog box using JavaScript Interop and [PrintJS](https://printjs.crabbly.com/).

![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Append.Blazor.Printing?style=flat-square)

## The result
![Screenshot](https://i.imgur.com/a0O6zwE.gif)

## The blogpost
You can read more about the service in [this blog post](https://medium.com/@benjaminvertonghen/printing-pdfs-in-blazor-8dff559101f9).

## Documentation
Documentation and examples can be found [here](https://blazor-printing.append.be/)

### Installing

You can install from NuGet using the following command:

`Install-Package Append.Blazor.Printing`

### Setup

1. Inject the `IPrintingService` in `program.cs`
```cs
builder.Services.AddScoped();
```
2. Use the Service
```razor
@using Append.Blazor.Printing
@inject IPrintingService PrintingService
PrintingService.Print("docs/sample.pdf"))">
Print PDF

```