I'm currently finishing up a web site project that involves a rather extensive set of backend accounting tools. One of these tools manages monthly royalty payments, and in order to make things as easy as possible on our staff, the site is designed to automatically generate printable envelopes with each recipient's mailing address, as well as our return address. Also necessary is the generation of perhaps a single .DOC file wherein each royatly statement is generated on a separate page boundary so they can be immediately printed.
Technically, this isn't a PHP-exclusive question, but rather, I'm curious as to what everyone thinks the best approach would be here. As far as I know there's no .DOC-generation API, so what would you recommend I do for the royalty statements? Furthermore, I'm wondering if anyone has any experience with having to generate printable envelope templates from a browser (although this would also be a likely application of the .DOC format, assuming I can find a simple enough way to generate them from PHP).
Any help/advice/perspective would be greatly appreciated. Thanks!