In this article we will learn about generating PDF file using VF Page. Here I will generate PDF file using Account data instead of account you can use any other standard or custom object
first we will create APEX class with ExportAccountCtrl name
public class ExportAccountCtrl {
public List AccList {get; set;}
public void getAccounts(){
AccList = [SELECT Name, Type, Rating, Industry FROM Account];
}
}
now we will create VF page with ExportPDF name
Account Name
Type
Rating
Industry
{!acc.Name}
{!acc.Type}
{!acc.Rating}
{!acc.Industry}