How to have a Visualforce Page Download as a pdf
When creating applications it’s a pretty common request to be able to create a formatted report or file in pdf file format.
For the most part, most customized pages and data can be easily converted into a PDF file without having to make many changes. In Salesforce, we can change customized Visualforce pages to create a pdf file by using the renderAs property and set the value to pdf.