Closed pwong2 closed 7 years ago
@wubzz UPDATE:
I tried to use this
PDFMerge(pdfFiles, { output: 'temp/batch/batch1.pdf', libPath: 'C:\Program Files (x86)\PDFtk\bin' })
.then(() => {
res.writeHead(200);
res.end();
});
then I encountered this,
Unhandled rejection Error: spawn C:Program Files (x86)PDFtkin ENOENT
at exports._errnoException (util.js:907:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
@pwong2 Either add C:/Program Files (x86)/PDFtk/bin
to your path, or change option libPath
to C:\\Program Files (x86)\\PDFtk\\bin\\pdftk.exe
.
Your second attempt was almost correct. But you have to escape the backslashes.
@wubzz can you help me on this please? I already searched the other possible like installing the pdftk, but can't find any solution.