Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/Append-IT/Blazor.Printing
- Owner: Append-IT
- License: mit
- Created: 2020-10-11T01:21:43.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-26T02:06:06.000Z (9 months ago)
- Last Synced: 2024-07-15T18:33:36.103Z (4 months ago)
- Topics: blazor, pdf, print
- Language: C#
- Homepage: https://blazor-printing.append.be/
- Size: 424 KB
- Stars: 107
- Watchers: 8
- Forks: 31
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-blazor - Blazor Printing - ![last-commit](https://img.shields.io/github/last-commit/append-it/Blazor.Printing?style=flat-square&cacheSeconds=86400) Print and save PDF documents with a native print dialog in a Blazor Server or client Application. (Libraries & Extensions / Tools & Utilities)
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
```