Download file direct to specific location using javascript
<p>I am using <code>jsPDF</code> to generate PDF file. What I want to do is when I click save button to save the file to specific location, for example in Desktop.</p>

<p>So far my code does this:</p>

<pre><code>var doc = new jsPDF();
doc.addImage(imgData, 'JPEG', 0, 0, 210, 40);
doc.save('test.pdf');
</code></pre>

<p>The .save function just gives us the opportunity to download the file, but what I want is to save the file to specific location, for example <code>C:\Users\username\Desktop</code>.</p>

<p>Thank you.</p>