I have a very similar requirement specified here.
I need to have the user\'s browser start a download manually when $(\'a#someID\').click();
But
The answer submitted by hitesh on Dec 30 '13 does in fact work. It just requires a little adjusting:
The PHP file can call itself. In other words, just create a file named saveAs.php, and put this code into it...
Download pdf here