Public bug reported: I'm trying to define a header and footer during half-day following the paperSize param documentation http://phantomjs.org/api/webpage/property /paper-size.html , however this does NOT work on the ubuntu build.
It's working with the binary provided by phantomjs website : http://phantomjs.org/download.html Easy to reproduce : easy.html: <h1>WTF</h1> index.js: var fs = require('fs'); var page = require('webpage').create(); page.onLoadFinished = function () { render() } page.paperSize = { format: 'A4', margin: "1.5cm", footer: { height: '4cm', contents: phantom.callback(function(pageNum, numPages) { return "Footer " + pageNum + " / " + numPages + ""; }) } }; var html = fs.read('easy.html'); page.setContent(html, './any.html'); function render () { page.render('out.pdf') page.close() phantom.exit(0) } Then simply run : # phantomjs index.js You should go out.pdf file, with the Footer, but you do not got the Footer. Crazy isn't it ? I'm on Ubuntu 16.04.2 LTS phantomjs 2.1.1 (same version in the package as on the website) ** Affects: phantomjs (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1676518 Title: Header and footer are not rendered To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/phantomjs/+bug/1676518/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs