function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to get the current page data in pdf format once click download button in object

How  to get the current page date in pdf format once click download button in object  



Kindely Share that Code fully pls

See if this helps.

You can create a button to redirect to another page which is rendered as pdf.

Satish Kumar

Hi Shatish



I am asking about Data converted in pdf format once click that Button Account object level


Hi Suresh...


Try below Code..


<apex:page controller="Example" sidebar="false" action="{!fetch}" contentType="application/x-pdf/#Std.pdf" cache="false">
<apex:page controller="Example" sidebar="false" action="{!fetch}" contentType="application/pdf" cache="false">
StudentNumber : {!Student.Name}
Student Name : {!Student.Student_Name__c}
City : {!Student.City__c}
Email : {!Student.Email__c}
Description : {!Student.Description__c}

public class Example

    public String StudentId;
    public Details__c Student {get;set;}
    public Example()

    public void fetch()
        StudentId = Apexpages.currentpage().getparameters().get('eid');
        emp = [SELECT Name, Student_Name__c, City__c, State__c, Email__c, Description__c FROM Details__c WHERE ID =: StudentId];




Cool Sfdc