NanoByte.Razor2Pdf 0.1.1

Razor2Pdf renders APS.NET Core Razor Pages as PDFs using WeasyPrint

There is a newer version of this package available.
See the version list below for details.
Install-Package NanoByte.Razor2Pdf -Version 0.1.1
dotnet add package NanoByte.Razor2Pdf --version 0.1.1
<PackageReference Include="NanoByte.Razor2Pdf" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NanoByte.Razor2Pdf --version 0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Razor2Pdf renders APS.NET Core Razor Pages as PDFs using WeasyPrint. To use it:

  1. Ensure that the weasyprint command is in your PATH. You can:
  2. Add a reference to the NanoByte.Razor2Pdf NuGet package to your project.
  3. Add a call to services.AddRazor2Pdf() in your ConfigureServices() method in Startup.cs.

You can now use dependency injection to get an instance of IPdfRenderer and use it like this:

FileStreamResult result = await pdfRenderer.RenderAsync("path/to/my/view", new MyViewModel(...));

See the sample project for more details.

Razor2Pdf renders APS.NET Core Razor Pages as PDFs using WeasyPrint. To use it:

  1. Ensure that the weasyprint command is in your PATH. You can:
  2. Add a reference to the NanoByte.Razor2Pdf NuGet package to your project.
  3. Add a call to services.AddRazor2Pdf() in your ConfigureServices() method in Startup.cs.

You can now use dependency injection to get an instance of IPdfRenderer and use it like this:

FileStreamResult result = await pdfRenderer.RenderAsync("path/to/my/view", new MyViewModel(...));

See the sample project for more details.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.2.0 74 10/2/2020
0.1.1 158 7/25/2020
0.1.0 141 7/11/2020