Closed cmoulliard closed 8 years ago
Here is the code that I'm using to render the HTML file (published here) - https://redhat-microservices.github.io/lab_swarm_forge-keycloak/
var conversion = require("phantom-html-to-pdf")(); var fs = require('fs'); var res = fs.createWriteStream('generated_content/hol.pdf'); var src = fs.readFileSync('/Users/chmoulli/MyProjects/litoria/generated_content/hol.html'); conversion({ html: src.toString(), allowLocalFilesAccess: true, format: { quality: 100 } }, function(err, pdf) { console.log(pdf.logs); console.log(pdf.numberOfPages); pdf.stream.pipe(res); });
The pdf file generated looks good excepted that the links aren't clickable
phantomjs@1.x which is included by default in this package doesn't support clickable links in pdf.
However it is supported in phantomjs@2.x which you can opt in, see here
Here is the code that I'm using to render the HTML file (published here) - https://redhat-microservices.github.io/lab_swarm_forge-keycloak/
The pdf file generated looks good excepted that the links aren't clickable