You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UPDATE: this turns out to be an issue with the Linux binary (0.12.5)
we installed this on a Windows server - same setup otherwise - and it works fine.
I posted this in the wrong github yesterday.
Basically, I have a few pdf's to generate that are dying at a certain point - consistently.
Smaller pdf's generate just fine. I cannot figure out why this is happening.
Below is my code. I don't know if it has anything to do with the fact that I am using sockets?
```
socket.on('make-pdf',function(data){
console.log('DATA 2',data.html.length);
var params = {
pageSize: 'letter' ,
footerHtml: data.footerHtml || '/pdf/footer/footer.html',
footerRight: data.footerRight || 'Page [page] of [toPage]',
footerLine: data.footerLine || true,
headerHtml: data.headerHtml || '/pdf/header/header-' + data.header + '.html',
headerSpacing: data.headerSpacing || 2,
marginTop: data.marginTop || '3cm',
marginBottom: data.marginBottom || '1cm',
marginLeft: data.marginLeft || '1.25cm',
marginRight: data.marginRight || '1.25cm',
headerLine: data.headerLine || true,
outline: data.outline || true,
outlineDepth: data.outlineDepth || 4,
javascriptDelay: 500,
username: data.user,
enableForms: data.enableForms || true,
orientation: data.orientation || 'Portait',
userStyleSheet: '/css/bootstrap.css',
runScript: '/js/jquery-3.4.1.min.js'
}
console.log('params', params);
console.log('end params');
var pdf = wkpdf(data.html, params, function (err, stream){
console.log(stream);
// you can use message here and only in here
if(err){
console.log('ERROR IN WKPDF: ',err);
} else {
console.log('STREAM ERROR:',err, stream);
toArray(stream, function (err, arr) {
console.log('OUTPUT OF TO ARRAY',err,arr);
var datas = {};
datas.buffer = Buffer.concat(arr);
datas.user = data.user;
datas.filename = data.filename;
socket.emit(data.returnEntry, datas);
});
}
});
});
Any help is much appreciated.
Thank you!
The text was updated successfully, but these errors were encountered:
UPDATE: this turns out to be an issue with the Linux binary (0.12.5)
we installed this on a Windows server - same setup otherwise - and it works fine.
I posted this in the wrong github yesterday.
Basically, I have a few pdf's to generate that are dying at a certain point - consistently.
Smaller pdf's generate just fine. I cannot figure out why this is happening.
Below is my code. I don't know if it has anything to do with the fact that I am using sockets?
The text was updated successfully, but these errors were encountered: