+ Start a Discussion
ckellieckellie 

Creating a VisualForce pdf with headers for each page

I am working on a projecto create a custom pront document with only the information from the opportunity, account, and other custom objects that are pertinent to the quote. What I would like to do is create a custom header that will appear on every page dynamically based upon the opportunity. How do I do this?
Best Answer chosen by Admin (Salesforce Developers) 
soofsoof
  1. Create a VF page and call it Header (or anyting else you like)
  2. If you need complex logic in order to decide what to show/hide on the header, create a Controller class and attach with Header VF page
  3. Use the <apex:inlude ... /> tag on each VF page to include the header page.
Not sure if that's what you're trying to achieve.  Let me know if that's not what you want.
 
-soof 

All Answers

soofsoof
  1. Create a VF page and call it Header (or anyting else you like)
  2. If you need complex logic in order to decide what to show/hide on the header, create a Controller class and attach with Header VF page
  3. Use the <apex:inlude ... /> tag on each VF page to include the header page.
Not sure if that's what you're trying to achieve.  Let me know if that's not what you want.
 
-soof 
This was selected as the best answer
ckellieckellie

This is exactly what i want. Thank you, I might ask follow-up questions as I progress through this project, but wanted to give you quick feedback.

 

Thank you

mataramatara
OPROARTS Apps Easy Merge PDF allows you to create documents with Opportunity information and it's highly customizable to suite your requirements. You can easily customize it to create a custom header that will appear on every page. There are many other features that would be very helpful to improve the quality of your documents. Visit here for a full profile of the product. You can also try the fully featured 30 day trial version of our solution here.