Pechkin icon indicating copy to clipboard operation
Pechkin copied to clipboard

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

Open manuelnelson opened this issue 12 years ago • 3 comments

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

manuelnelson avatar Dec 03 '12 15:12 manuelnelson

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);

bUKaneer avatar Dec 03 '12 15:12 bUKaneer

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

manuelnelson avatar Dec 03 '12 16:12 manuelnelson

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

mattki avatar Apr 30 '13 00:04 mattki