var htmlToPdf = new NReco.PdfGenerator.HtmlToPdfConverter();
htmlToPdf.PageFooterHtml = @"<div style='text-align:right; font-size:14px;'>Page <span class=""page""></span> of <span class=""topage""></span><div>";
htmlToPdf.Margins.Top = 15;
htmlToPdf.Margins.Bottom = 15;
htmlToPdf.Margins.Left = 8;
htmlToPdf.Margins.Right = 8;
var pdfBytes = htmlToPdf.GeneratePdf(HtmlFile);
File.WriteAllBytes(newpath, pdfBytes);
htmlToPdf.PageFooterHtml = @"<div style='text-align:right; font-size:14px;'>Page <span class=""page""></span> of <span class=""topage""></span><div>";
htmlToPdf.Margins.Top = 15;
htmlToPdf.Margins.Bottom = 15;
htmlToPdf.Margins.Left = 8;
htmlToPdf.Margins.Right = 8;
var pdfBytes = htmlToPdf.GeneratePdf(HtmlFile);
File.WriteAllBytes(newpath, pdfBytes);
No comments:
Post a Comment