Rank: Newbie Groups: Member
Joined: 1/4/2015 Posts: 1
|
Hi, I am trying to output a page header onto my generated pdfs using the following code. I am expecting the generated header to be styled based on the css for that url, however it is not picking up on any css rules at all. Am I missing something here?
Code: C#
var headerUrl = someurl;
foreach (var page in document.Pages)
{
var options = new HtmlToPdfOptions
{
[SomeOptions]
BaseUrl = Request.Url.Host
};
HtmlToPdf.ConvertUrl(headerUrl, page, options);
}
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
This is very normal and you did not miss anything. The header and footer are NOT a part of the main HTML document, thus they will not share the main document's CSS. If you want to have styles in the header/footer area, you will need to include the styles in the HeaderHtmlFormat/FooterHtmlFormat property.
Thanks!
|