.Net Pdf Generator

Getting Started

Download the binaries from here, include them in your project and add a reference.

You'll also need to install Wkhtml which you can download from http://wkhtmltopdf.org/downloads.html.

Basic Example

PdfGenerator _pdfGenerator = new PdfGenerator();
_pdfGenerator.Config.SetExeLocation("C:/Program Files/wkhtmltopdf/bin/wkhtmltopdf.exe").SetExeWorkingDirectory("~/pdf-output/temp").SetExeOutputDirectory("~/pdf-output");
_pdfGenerator.AddSource("http://www.example.com").AddHTMLSource("some HTML");

byte[] _result = _pdfGenerator.GeneratePDF("demo-1-single.pdf");
comments powered by Disqus