Closed pwong2 closed 7 years ago
@pwong2 Why do you want to make it synchronous?
Node 8 introduces a nice syntax
try {
const mergedPDFBuffer = await PDFMerge(pdfFiles);
res.writeHead(200);
res.end();
} catch(error) {
//Error handler
}
No reply in two days, closing. Reopen if this is still an issue.
Hi @wubzz I know this is not an issue in pdf-merge, I'm new in node.js and I need your help maybe you already tried on it, I want to know how this method can be synchronous? the file must be merged first before it return the response 200.
PDFMerge(pdfFiles, { output: filepath, libPath: libPath })
.then(() => { res.writeHead(200); res.end(); });
thanks in advance