You need to sign in to do that
Don't have an account?
Chad Coffey
Render Page as PDF but Change Title at the Top of Page
Hello,
I am trying to render a custom object as a PDF and I have that working, however I want to replace the Title of the Object with something different, so our users can print the page off as a PDF and take on meetings. Currently the pages Title is the title of the Object, and that title can be misleading if a Client notices. Any help would be greatly appreacited!
Here is my Visualforce code I have put in a custom button:
<apex:page standardController="Challenger_Sales_Teaching_Agenda__c" renderAs="pdf">
<apex:detail Relatedlist="false" />
</apex:page>
I am trying to render a custom object as a PDF and I have that working, however I want to replace the Title of the Object with something different, so our users can print the page off as a PDF and take on meetings. Currently the pages Title is the title of the Object, and that title can be misleading if a Client notices. Any help would be greatly appreacited!
Here is my Visualforce code I have put in a custom button:
<apex:page standardController="Challenger_Sales_Teaching_Agenda__c" renderAs="pdf">
<apex:detail Relatedlist="false" />
</apex:page>
The code to achieve this is as below - Here is what I have done, I have put a <h1> and a <hr> tag to bring a heading and a horizontal rule. Heading is nothing but the record name itself. Doing so the emphasis becomes on the record name now. Unlike before, when the emphasis was on the "Lead Detail". So now the confusions can be avoided.
All Answers
The code to achieve this is as below - Here is what I have done, I have put a <h1> and a <hr> tag to bring a heading and a horizontal rule. Heading is nothing but the record name itself. Doing so the emphasis becomes on the record name now. Unlike before, when the emphasis was on the "Lead Detail". So now the confusions can be avoided.
As Shruti pointed out, we won't be able to alter the standard detail layout. But we can add a wrapper around that.