1

I'm in the middle of creating a html to pdf converter using the wkhtmltopdf application and having trouble trying to insert a custom header and footer to appear on the output document. For the program I am making this for I need these to be created within the html page that gets passed into the converter for packaging reasons. The wkhtmltopdf program won't accept the @media print css method so I was wondering if there was any other way in which this can be done within HTML,JavaScript, or CSS?

Sayse
  • 42,633
  • 14
  • 77
  • 146
  • Your question is a little vague. You want another program which converts html to pdf? – Neil Apr 10 '12 at 12:37
  • my apologies.. the problem isn't with the pdf converter, its with the adding a header/footer to a web page to be displayed at the top and bottom of a page in a pdf (paper pages not web pages). I'm looking for a way to create these within a html document without using the @media print option in css – Sayse Apr 10 '12 at 12:43

1 Answers1

1

Use the --header-html and --footer-html options to pass in a URL or file path to the executable. Documentation

If you are linking to the library use the object settings header and footer properties: settings.header.htmlUrl

code0100fun
  • 180
  • 1
  • 11