I need to be able to choose from a document template and populate it with Salesforce data. This could be preprocessed documents with merge fields that are already uploaded in Salesforce.Say I'm in a case record and I choose a document template from a dropdown, I want to download that document with all merge fields populated with data from the case record.I know this would be possible if you export the documents as html and add them to email templates and just render the html in a visualforce page as pdf or docx. This method seems to be losing the images and some styling of the documents though.Anyone know how I can do this?