maxelct Posted January 29, 2016 Share Posted January 29, 2016 Hi I am running a WAMP local server with php 5.4.12. I have to create a number of word.docx files from a database. My research suggests lots of possibilities. My forms are not going to be complex, but I do need to be able to save / print them Using headers wont give me much control I don't think. I know this is a bit of a vague question - but could anyone advise on which approach might be best for me? I'd really appreciate it Edward Quote Link to comment Share on other sites More sharing options...
Barand Posted January 29, 2016 Share Posted January 29, 2016 One easy option is to create HTML or PDF files. Word will open those and you can save as DOCX Quote Link to comment Share on other sites More sharing options...
maxelct Posted January 29, 2016 Author Share Posted January 29, 2016 Thanks - hadn't come across that option in my research. It all needs to be automatic - the user is going to be generting 100s (potentailly) of different docs/reports. Quote Link to comment Share on other sites More sharing options...
requinix Posted January 29, 2016 Share Posted January 29, 2016 If you want true Word docs then I'd mention phpdocx. Not free. At my work we needed to convert HTML into something editable for our users to download, checked out options, and went with phpdocx. Does the job well enough. However, if you're running PHP from a Windows box, and don't have a problem installing Office on it too, then you can use COM to "script" Word into opening up HTML files and re-saving them. Quote Link to comment Share on other sites More sharing options...
maxelct Posted January 29, 2016 Author Share Posted January 29, 2016 phppdocx looks interesting. But I think I need something that doesn't involve licensing (long story). Our docs have to be saved into a folder, and then personal comments have to be added into. Quote Link to comment Share on other sites More sharing options...
maxxd Posted February 1, 2016 Share Posted February 1, 2016 I've not tried it, but there's this - https://github.com/PHPOffice/PHPWord. Seems worth looking into. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.