Package Description
$ dotnet add package HtmlConverterClientTo use this client library, you need to have a valid API license key. You can obtain one for free at https://htmlconverter.online (some limits apply).
This package is a client library to access the HTML Converter API, which allows you to convert HTML content into various formats such as PDF, DOCX, and images.
var client = new HtmlConverterClient("my-key-goes-here");
var request = new ConvertRequest(htmlSource: "<html><body><h1>Hello, World!</h1></body></html>",
toFileType: FileType.Pdf);
var response = await client.ConvertAsync(request);
if (response.Success)
{
await File.WriteAllBytesAsync("output.pdf", response.Content);
}
else
{
Console.WriteLine($"Error: {response.ErrorMessage}");
}