title: Mozilla pdf.js, How to I specify the filename for download?
body: <p>I pass the location of the php file that contains the following code as parameter to the <code>viewer.html</code> file and it is displayed correctly but when clicking the download button in the pdf viewer the document name is always <code>document.pdf</code>. This poses a problem because of how many mobile users will be downloading files only to discover that all of their files have the the name <code>document.pdf</code> and that they (for most mobile browsers) can't change the filename before downloading.</p>
  
  <p>Do I have to pass some arbitrary parameter to the file or redirect to self with the filename appended?</p>
  
  <pre><code>&lt;?php
  $content = "a binary representation of my pdf";
  header("Content-type: application/pdf");
  header('Content-Transfer-Encoding: binary');
  header('Content-Disposition: attachment; filename="someFile.pdf"');
  echo $content;
  ?&gt;
  </code></pre>