PrintToPdfAsync with custom header/footer
Posted: Tue Apr 27, 2021 7:25 am
Hi,
I'm trying to print a page to PDF but the custom header/footer data I use only get half printed.
This is the code
The page is correclty printed, but the headers are the date on the left, and the original page title on the right; while the footer has HeaderFooterUrl on the left and the page counter on the right.
How can I take full control of these elements?
I'm trying to print a page to PDF but the custom header/footer data I use only get half printed.
This is the code
- Code: Select all
PdfPrintSettings pdfSettings = new PdfPrintSettings
{
BackgroundsEnabled = false,
HeaderFooterEnabled = true,
HeaderFooterUrl = "some url string",
HeaderFooterTitle = "some title string "
};
cef.PrintToPdfAsync(fileName, pdfSettings).Wait();
The page is correclty printed, but the headers are the date on the left, and the original page title on the right; while the footer has HeaderFooterUrl on the left and the page counter on the right.
How can I take full control of these elements?