title: Merging PDFs in Node
body: <p>Hi i'm trying to merge pdf's of total of <em>n</em> but I cannot get it to work.</p>
  
  <p>I'm using the Buffer module to concat the pdf's but it does only apply the last pdf in to the final pdf.</p>
  
  <p>Is this even possible thing to do in node?</p>
  
  <pre><code>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!");
  });
  </code></pre>
  
  <p>There are currently some libs out there but they do all depend on either other software or programming languages.</p>