Welcome Guest Search | Active Topics | Sign In | Register

EOPdf Page header Options
Sam Low
Posted: Saturday, January 24, 2015 12:08:19 AM
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);
}
eo_support
Posted: Sunday, January 25, 2015 9:22:04 PM
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.