简体   繁体   中英

DinkToPdf display on every page

I want to display a header on every page of the PDF i get with DinkToPdf. I know I can use the HeaderSettings class, but I cannot edit that text (I want to add a background color). Is there any way I can achieve that with html?

I've also tried to set the HtmUrl of the HeaderSettings, but that didn't work.

This is the header I want on every page:

.header {
    background-color: #022251;
    color: white;
    padding: 1%;
}

HtmUrl of the HeaderSettings is the answer for custom Header.

Create a html file and add a class header and add these styles. Now Give absolute path of your html file to htmurl. Let me know if any issues!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM