+ Start a Discussion

Visualforce PDF design advice



I've got a VisualForce page that currently is built around a CustomControllerExtention to create a PDF worksheet based on one Contact.


I highly recommend Quinton Wall's article -- http://wiki.developerforce.com/index.php/Creating_Professional_PDF_Documents_with_CSS_and_Visualforce -- and I used that as a strong reference in my own work.


This has been pretty successful, and I've now had a request to make it "bulk" -- so instead of just being a PDF for one Contact, they can generate the worksheets for several contacts in one PDF file.  Or to use Quinton's example, instead of generating a separate PDF for one Quote, be able to generate one PDF that contains several quotes. 


Imagine a button in a list view, where you select several quotes and then there is a list view button called "generate PDF" that will go through and generate a PDF with all of the selected quotes.


Obviously I'm going to have to refactor & rebuild the controller to make it support the bulk PDFs, but I'm wondering if people have suggestions about what the best approach is -- do I want to build another class that collects all of the data for multiple contacts?  Do I need to move from an extension to a distinct custom controller?  Or am I missing something obvious?