title: Can't force the pdf download with express.js
body: <p>I'm using express.js with pdfkit, trying to generate a pdf and force a download in a webbrowser. </p>
  
  <p>I defined static location where the pdf is stored, but when I want to read this location and download the file nothing happens. I've tried also setting headers, but that didn't work.  </p>
  
  <p>I've read that that may have something to do with the ports on which server and front-end is running. In my case these are: 4200 (Angular) and 8080 (Node.js)</p>
  
  <p>Here is fragment of the server code:</p>
  
  <pre><code>var downl = doc.pipe(fs.createWriteStream('C:/Users/Martyna/Desktop/test pdfow/out.pdf') );
  
  doc.end();
  
  downl.on('finish', function() {
      res.download('C:/Users/Martyna/Desktop/test pdfow/out.pdf', 'out.pdf');
  })
  </code></pre>