https://github.com/nbaztec/dotnet-wkhtmltopdf
https://github.com/nbaztec/dotnet-wkhtmltopdf
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/nbaztec/dotnet-wkhtmltopdf
- Owner: nbaztec
- Created: 2019-02-07T15:38:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-08T12:20:24.000Z (over 7 years ago)
- Last Synced: 2025-02-04T17:28:20.980Z (over 1 year ago)
- Language: C#
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WkHtmlToPdf wrapper for C#
```
var pdf = PdfGenerator.MakeDefault();
try
{
var bytes = await pdf.Generate(File.ReadAllBytes("test.html"));
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
File.WriteAllBytes("test.pdf", bytes);
```
Requires [wkhtmltopdf](https://wkhtmltopdf.org/downloads.html) binary in the system PATH.