I am using wkhtmltopdf 0.12.6 with asp.net core and deployed it in Azure Linux. I want to show different header for the cover page. But when I generate, page header is not showing for the cover page. Page header has been removed automatically.
How to add page for the cover page? The following is NReco code. But if the solution has been found from wkhtmltopdf, then it is fine.
NReco code Code:
public class PdfService : IPdfService
{
public HtmlToPdfConverter HtmlToPdf { get; }
public PdfService(
HtmlToPdfConverter htmlToPdf)
{
HtmlToPdf = htmlToPdf;
SetupConverter();
}
public byte[] ToPdf(string htmlContent, string coverpage)
{
return HtmlToPdf.GeneratePdf(htmlContent, coverpage);
}
public byte[] ToPdf(string htmlContent, string coverpage, string header)
{
HtmlToPdf.PageHeaderHtml = header;
return ToPdf(htmlContent, coverpage);
}
}