Closed constructor-igor closed 7 years ago
public static Byte[] PdfSharpConvert(String html)
{
Byte[] res = null;
using (MemoryStream ms = new MemoryStream())
{
var pdf = TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.GeneratePdf(html, PdfSharp.PageSize.A4);
pdf.Save(ms);
res = ms.ToArray();
}
return res;
}
iTextSharp sample: http://stackoverflow.com/questions/2822843/itextsharp-html-to-pdf
http://stackoverflow.com/questions/564650/convert-html-to-pdf-in-net