A .netstandaard wrapper for the weasyprint PDF printer. This package is standalone and does not required you to install any software on your server. It runs on windows and linux.
License
—
Deps
1
Install Size
—
Vulns
✓ 0
Published
Nov 2, 2025
$ dotnet add package Weasyprint.WrappedWrapper around the weasyprint library which allows you to print html to a pdf file. This package does not require any external software or packages to be installed in order to use weasyprint.
dotnet add package Weasyprint.Wrapped
You might want to provide the printer class using your DI Container.
await new Printer().Initialize();
await new Printer().Print("<html><body><h1>TEST</h1></body></html>");
This is a large package, try to limit the projects where it will be installed.
Thanks to all these great repos and the guys maintaining them!!!
Windows:
.\build-on-windows.ps1
Linux:
.\build-on-linux.ps1
Create package:
cd .\src\Weasyprint.Wrapped\
dotnet pack -p:PackageVersion=0.0.[[NUMBER HERE]] --output nupkgs
Update the example project package version (Weasyprint.Wrapped.Example.csproj) and run the example to test it
$Env:PATH += ";C:\weasyprint.wrapped\standalone-win-64\gtk3\bin"cd c:\weasyprint.wrapped\standalone-win-64\python
.\python.exe -m pip install weasyprint
.\python.exe -m weasyprint --info
cd c:\weasyprint.wrapped\standalone-linux-64\python\bin\
python3 -m pip install weasyprint
python3 -m weasyprint --info
.\python.exe -c "import os; print(*os.environ['PATH'].split(os.pathsep), sep='\n')"