I have problems generating same PDF in windows and i Linux. The code basically works both places, but the pdf output differs between the 2 systems.
When the code runs on LINUX the width is sometimes (only in A3-landscape) about 2/3 of the width in windows.
The phantomJS version is 2.1.1 on both systems. Both have phantomjs installed only locally by npm (not by apt-get or otherwise).
Anyone seen this before ?
var pdf = require('html-pdf');
restRouter.post('/convertpdf', function(req, res, next) {
res.setHeader('Content-disposition', 'attachment; filename="' + encodeURIComponent(req.body.file) + '"');
res.setHeader('Content-type', 'application/pdf');
pdf.create(req.body.html, req.body.options).toStream(function(err, stream) {
stream.pipe(res);
if (err)
logger.error(err);
});
});
I am getting inconsistent results when comparing windows to linux as well. Windows version always comes out correct, but same template generated on linux looks like zoomed in version of the windows one, resulting in overflowing to the next page, etc. Both html-pdf and phantomJS version are the same on windows and linux machines.
Seeing the same issue, any suggestions here?
any update on this issue?
Most helpful comment
I am getting inconsistent results when comparing windows to linux as well. Windows version always comes out correct, but same template generated on linux looks like zoomed in version of the windows one, resulting in overflowing to the next page, etc. Both html-pdf and phantomJS version are the same on windows and linux machines.