gmanny / Pechkin

.NET Wrapper for WkHtmlToPdf static DLL. Allows you to utilize full power of the library.
400 stars 128 forks source link

Content Spacing for header/footer doesn't seem to work #21

Open manuelnelson opened 11 years ago

manuelnelson commented 11 years ago

Here's a snippet of my code. I'm not doing anything too tricky here, and everything seems to work except for the content spacing. All I'm looking for is more margin after the header.

https://gist.github.com/4195776

bUKaneer commented 11 years ago

There are some issues with fluent notation try changing your code from this:

config.SetAllowLocalContent(true)
.SetPrintBackground(true);

to this (Do this anywhere you've used fluent notation):

config.SetAllowLocalContent(true); config.SetPrintBackground(true);

manuelnelson commented 11 years ago

Thanks. Changed this but it doesn't seem to fix the Content spacing problem unfortunately.

mattki commented 11 years ago

I'm having the same issue. I got around it by using html header/footer - you can just add
a couple of times in the html to increase the vertical height of the header/footer.

eg objConf.Footer.SetHtmlContent(url); or objConf.Header.SetHtmlContent(url);

HTML template here: https://code.google.com/p/wkhtmltopdf/issues/detail?id=306