I have done this in 2 different ways, which you choose is likely to depend on whether or not your users need to print your documents.
Following exactly your scenario above, you need to create document template (HTML, ODT or XSL-FO or MS Word if you run on Windows server) and a rule that is executed "on create" or "on update". The rule does a transform using your document metadata and your template. The template can be in any format you like, but what I did was to make it an HTML template (because it was easier to create) and then after the transform, do a rendition to PDF. This works but the drawback is that the HTML templates don't "dispaly in browser" well to A4 for printing. Whilst you can do the PDF render from the HTML (which does go to A4) the render chain (HTML -> OpenOffice -> PDF) has a tendency to be inaccurate especially about tables with borders.
We have done exactly the same but using a XSL-FO template (and an associated custom transform) which works beautifully but the XSL-FO templates are hard to create and there seems to be only 1 open souce graphical designer (which has not been updated since 2008) and commercial XSL-FO template designers are very expensive. We did it by hand as the template was not that complex and not that likely to change.
We have also done it using an OpenOffice template. This to works well but requires a small amount of Java programming.
If you don't need to print, then in my opinion the very best way to do what you need is as follows:-
<ul>
<li>Create a new mimetype that represents "metadata only documents".</li>
<li>Create a special web preview extension that uses an FTL template to format the metadata in your document for display in the web preview pane.</li>
</ul>
This sounds like a lot of work but isn't, its supremely flexible, you can display diffrent data dependent upon user / user role and its only downside is that you don't get printable output (which you could do by adding a transform / render and making it invisible).