[SalesForce] How to attach a pdf in salesforce email,edit the email body and the changes will reflect in atached pdf

I want to attach a pdf in a salesforce email by selecting an email template.I have created one visualforce template by which I am able to attach the pdf to the mail.But my requirement is user can edit the email body like the html template and the attached pdf will get refreshed reflecting the changes,Appreciate your help!

Best Answer

Make the email by rendering a Visualforce page as a pdf. There is lots of sample code if you search Developerforce for Email - with quote2pdf, sending SingleEmailMessage, and more.