+ Start a Discussion
Nikitha PraveenNikitha Praveen 

How to generate PDF for Opportunity?

Best Answer chosen by Nikitha Praveen
shaik murthujavalishaik murthujavali
Hi Nikitha,
Use the below visual force page includes standard controller, if you have any other requirement you can also use controller.
<apex:page standardController="Opportunity" renderAs="pdf">

<h1>Opportunity</h1>
<p>Thank you for <b><apex:outputText value=" {!Opportunity.Name}"/></b></p>
<table>
<tr><th>Opportunity Name</th>
    <td><apex:outputText value="{!Opportunity.Name}"/></td>
    </tr>
<tr><th>Account Rep</th>
    <td><apex:outputText value="{!Opportunity.Owner.Name}"/></td>
    </tr>
</table>
</apex:page>
Hope it helps, let me know if it works for you/need any further help on this.

Thanks,
Shaik Murthujavali

All Answers

shaik murthujavalishaik murthujavali
Hi Nikitha,
Use the below visual force page includes standard controller, if you have any other requirement you can also use controller.
<apex:page standardController="Opportunity" renderAs="pdf">

<h1>Opportunity</h1>
<p>Thank you for <b><apex:outputText value=" {!Opportunity.Name}"/></b></p>
<table>
<tr><th>Opportunity Name</th>
    <td><apex:outputText value="{!Opportunity.Name}"/></td>
    </tr>
<tr><th>Account Rep</th>
    <td><apex:outputText value="{!Opportunity.Owner.Name}"/></td>
    </tr>
</table>
</apex:page>
Hope it helps, let me know if it works for you/need any further help on this.

Thanks,
Shaik Murthujavali
This was selected as the best answer
Khan AnasKhan Anas (Salesforce Developers) 
Hi Nikitha,

Greetings to you!

Please refer to the below links which might help you further with the above requirement.

https://www.linkedin.com/pulse/generate-pdfs-salesforce-without-writing-any-code-harleen-mann/

https://salesforce.stackexchange.com/questions/175381/how-can-we-generate-pdf-from-selected-standard-and-custom-objects

http://www.interactiveties.com/blog/2015/visualforce-button-pdf.php

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas