HtmlToPdfImage icon indicating copy to clipboard operation
HtmlToPdfImage copied to clipboard

transform html to pdf/image ,base on wkhtmltox and dotnet core 2.0

HtmlToPdfImage

It is base on wkhtmltox and dotnet core 2.0 which supports running on windows and linux which can transfer html to pdf and image for free .

Open broswer and visit http://xxxx:5001/api/html/image which can transfer html to image.

transform Html to image

And visit http://xxxx:5001/api/html/pdf which can transfer html to pdf.

transform Html to pdf

Notes:

  • if you want to publish it to linux ,you should replace wwwroot\Wkhtmltox\wkhtmltoimage.exe with wwwroot\Linux\wkhtmltoimage.exe, replace wwwroot\Wkhtmltox\wkhtmltopdf.exe with wwwroot\Linux\wkhtmltopdf.exe.
  • The folder you publish on linux should has high permission by executing command: chmod -R 777 *