I am building html
views with stringbuilder
and using DinkToPDF
to convert this HTML to a pdf. I have been able to add a header and footer using the following(By creating static HTML
pages:
var objectSettings = new ObjectSettings
{
PagesCount = true,
HtmlContent = await _template.Build(data, hostUrl),
//HeaderSettings = { HtmUrl = hostUrl + "/views/v1/getview?reportName=AcademicTranscript&viewName=test.html&themeName=SchoolTheme_SchoolId",
HeaderSettings = { HtmUrl = hostUrl + _swaggerConfig.BasePath + "/views/v1/getview?reportName=AcademicTranscript&viewName=portraitheader.html",
Line = true, Right = "[page]/[sitepages]", Spacing = 5 },
FooterSettings = { HtmUrl = hostUrl + _swaggerConfig.BasePath + "/views/v1/getview?reportName=AcademicTranscript&viewName=portraitfooter.html",
Line = true },
};
This works great, but I need to add a custom html
view as part of the header, which contains details, such as Name, surname, address etc.
Is there a way of adding a custom built page(meaning Html tags etc. with information from the Database) to the header?
I hope my question makes sense.
Thanks for any help.