You need to sign in to do that
Don't have an account?
![mstev45 mstev45](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Using a button to display record as PDF
Hi, i am very new to visualforce.
What i am trying to create is a custom button on a detail page of a custom record. When the user clicks on the button i want it to view the the record as PDF format. I know how to create the button and then load a visualforce page, and i know there is the renderAs="pdf" function. What i am struggling with is how to show all display the fields from the record in the pdf page.
Any help on this would be great.
Matt
Here is an example: http://wiki.developerforce.com/index.php/Visualforce_Quote2PDF
In short, create a Visualforce page with the renderAs="pdf" and in that page, simply use apex:outputField or apex:outputText components to output the values.
All Answers
Here is an example: http://wiki.developerforce.com/index.php/Visualforce_Quote2PDF
In short, create a Visualforce page with the renderAs="pdf" and in that page, simply use apex:outputField or apex:outputText components to output the values.
That is exactly the sort of thing i was looking for thanks. I just used the <apex:outputField> tag as you suggested and it worked perfectly. Just one more quick question, it doesnt include the field label when i do this it just outputs the field value, how do i include the field label aswell?
Many Thanks,
Matt