Header and footer are not rendered
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
phantomjs (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I'm trying to define a header and footer during half-day following the paperSize param documentation http://
It's working with the binary provided by phantomjs website : http://
Easy to reproduce :
easy.html:
<h1>WTF</h1>
index.js:
var fs = require('fs');
var page = require(
page.onLoadFinished = function () {
render()
}
page.paperSize = {
format: 'A4',
margin: "1.5cm",
footer: {
height: '4cm',
contents: phantom.
return "Footer " + pageNum + " / " + numPages + "";
})
}
};
var html = fs.read(
page.setContent
function render () {
page.
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)
information type: | Public → Public Security |
information type: | Public Security → Public |