Hi, I am trying to combine pdf for a total of n, but I cannot get it to work.
I use a buffer module to compress pdf, but it will only apply the last pdf file to the final pdf.
Is it possible to do this in node?
var pdf1 = fs.readFileSync('./test1.pdf'); var pdf2 = fs.readFileSync('./test2.pdf'); fs.writeFile("./final_pdf.pdf", Buffer.concat([pdf1, pdf2]), function(err) { if(err) { return console.log(err); } console.log("The file was saved!"); });
Some libraries currently exist, but they all depend on other software or programming languages.
source share