Closed kingroryg closed 8 years ago
I did something like this to get customized header and footer:
var runnings = "module.exports = { header: {height: '1cm', contents: function(page) { return page === 1 ? '' : '<div style=\"text-align: center\">Title</div>' }}, footer: {height: '1cm', contents: function(page, pages) { return '<div style=\"text-align: center\">' + page + '/' + pages + '</div>'}} }"
...
"runnings" : runnings
However, conversion implementation seem to be buggy. I made two fixes into code before conversion was made successfully. Fixes are found here: https://github.com/pejuam/phantom-html2pdf/commits/master
Would you mind to update the docs as well? Thanks!
@saru95 Is this solved for you with the answer from @pejuam?
Can someone please explain what the "runnings" file does and provide an example of it? This seems to be an important item that is completely undocumented, unless I'm missing something.
Thanks in advance.
@befreestudios https://github.com/bauhausjs/phantom-html2pdf#runnings-file
@dustin-H Not sure how I missed that.. (bows head in shame, lol)
BTW awesome little lib, nice job. Does exactly what we need with minimal configuration.
Thanks! Credits to @PhilippCh for initially creating this!
MY options look like this ,
However, I have no idea as to what should go inside the runnings property .