Rendering visualforce page as a pdf

How can you rendering vf page as a pdf? By using renderAs attribute you can render visualforce page as a pdf.

Where we can use renderAs attribute? We can use renderAs attribute in apexPage tag like below.

<apex:page  StandardController=”Account ” renderAs=”pdf”>

Below is simple code to rendering a visualforce page as pdf.

<apex:page renderAs=”pdf”>
<h1>Welocome to Salesforce Tutorial</h1>

Below is the output for this.