NetCoreHTMLToImage 1.1.0

Package Description

Install-Package NetCoreHTMLToImage -Version 1.1.0
dotnet add package NetCoreHTMLToImage --version 1.1.0
<PackageReference Include="NetCoreHTMLToImage" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NetCoreHTMLToImage --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

.NET Core HTML to Image converter

This is a .NET Core HTML to Image converter. It helps converting HTML strings or URLs to image bytes. Please see the examples:

Installation Instructions

Nuget package available (https://www.nuget.org/packages/NetCoreHTMLToImage)

Install-Package NetCoreHTMLToImage

Convert HTML string to image bytes

var converter = new HtmlConverter();
var html = "<div><strong>Hello</strong> World!</div>";
var bytes = converter.FromHtmlString(html);
File.WriteAllBytes("image.jpg", bytes);

Convert URL to image bytes

var converter = new HtmlConverter();
var bytes = converter.FromUrl("http://google.com");
File.WriteAllBytes("image.jpg", bytes);

Optional parameters

  1. width - output document width. Default is 1024.
  2. format - output image format. Default is Jpg.
  3. quality - output image quality from 1 to 100. Default is 100.

Roadmap

  • Async interface

More about this library

This is andrei-m-code library rework

For Ubuntu users

sudo wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo apt-get install -f
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin

.NET Core HTML to Image converter

This is a .NET Core HTML to Image converter. It helps converting HTML strings or URLs to image bytes. Please see the examples:

Installation Instructions

Nuget package available (https://www.nuget.org/packages/NetCoreHTMLToImage)

Install-Package NetCoreHTMLToImage

Convert HTML string to image bytes

var converter = new HtmlConverter();
var html = "<div><strong>Hello</strong> World!</div>";
var bytes = converter.FromHtmlString(html);
File.WriteAllBytes("image.jpg", bytes);

Convert URL to image bytes

var converter = new HtmlConverter();
var bytes = converter.FromUrl("http://google.com");
File.WriteAllBytes("image.jpg", bytes);

Optional parameters

  1. width - output document width. Default is 1024.
  2. format - output image format. Default is Jpg.
  3. quality - output image quality from 1 to 100. Default is 100.

Roadmap

  • Async interface

More about this library

This is andrei-m-code library rework

For Ubuntu users

sudo wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo apt-get install -f
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin

  • .NETStandard 2.1

    • No dependencies.

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
1.1.0 88 10/12/2020
1.0.1.4 506 2/17/2020
1.0.1.3 136 2/17/2020
1.0.1.1 150 2/17/2020
1.0.0 150 1/27/2020