title: Download PDF (PDFKit) from ExpressJS to AngularJS
body: <p>Using:</p>
  
  <pre><code>var doc = new PDFDocument();
  doc.pipe(res);
  doc.text('Add content here');
  doc.end();
  </code></pre>
  
  <p>within an Express <code>GET</code> route I'm able to navigate in the browser and view the PDF. Once viewed it can be saved or printed. </p>
  
  <p>That's good, but what I need is for the PDF to automatically download. The application will send a <code>PUT</code> to Express. From the one <code>PUT</code>, is it possible to also auto-download the PDF?  Angular needs a 200 response to return control to Angular and the user, but the PDF also needs to be downloaded.  </p>
  
  <p>I've tried <code>res.end(new Buffer(doc), 'binary)</code>, <code>res.send(new Buffer(doc, 'binary'))</code>, etc, but can't get the PDF to download.  If I can't return a 200 and download the PDF from a <code>PUT</code> then my fallback is to <code>PUT</code> and once that returns do a <code>window.open</code> to the <code>GET</code> route to view the PDF. Kind of hacky, so  I would really prefer a download.</p>
  
  <p>Options?</p>