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?
Share
Use the
--header-htmland--footer-htmloptions to pass in a URL or file path to the executable. DocumentationIf you are linking to the library use the object settings header and footer properties:
settings.header.htmlUrl