Best options for .doc(x) libraries?
I'm using native PHP and I'm looking for a way to generate .doc files on the fly. I want to be able to do image insertion, TOC, header-footers, tables etc.
I can find half decent .rtf generator libraries but they don't do TOC of course. Anything for .doc(x) is either in beta and a bit ropey or seems to cost $$$. There seems to be about 3 main libraries/packages in this space. Can anyone recommend anything I might have overlooked?
I believe some PHP frameworks might have solutions for this but I can't use them right now. What are peoples suggestions? Should I look to creating a HTML->DOC type setup or something else?
I guess I could go straight to PDF but I kinda need the document to be user-editable too.
I'm stumped! Any suggestions?