What can I do on a Visualforce page that is a
renderAs="pdf" that will result in the name of the file that shows up when the user clicks
Save As... to not be the name of the Visualforce page.
The page is generated via a GET request coming from clicking a custom button.
Below is some code that is representative of the PDF.
<apex:page standardController="Account" extensions="AccountPdf" showHeader="false" sidebar="false" renderAs="PDF" title="AccountReport.pdf" contentType="application/pdf#AccountReport.pdf" <head> <title>AccountReport.pdf</title> </head> <apex:outputText value="Hello World"/> </apex:page>
The browser bar does not have the title value in it and when the user clicks
Save As... the name of the file is the name of the Visualforce page (e.g., myPageName). If I remove the
renderAs="pdf" the file downloads automatically with the correct file name due to the contentType, but the actual content type doesn't appear to be a PDF.