Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.
/ wkhtmltox-core Public archive

A (work in progress) wkhtmltopdf wrapper for .NET Core

Notifications You must be signed in to change notification settings

ngraef/wkhtmltox-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build

dotnet pack

Usage

using WkHtmlToX;

var settings = new PdfGlobalSettings();
settings.PageSize = PageSize.Letter;
settings.Orientation = Orientation.Landscape;
settings.ColorMode = ColorMode.Color;

var inFile = "template.html";
var outFile = "output.pdf";

using (var converter = new HtmlToPdfConverter(settings))
{
    var html = System.IO.File.ReadAllText(inFile);
    var data = converter.ConvertToPDF(html);
    System.IO.File.WriteAllBytes(outFile, data);
}

About

A (work in progress) wkhtmltopdf wrapper for .NET Core

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages