Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Nov 2012
    Posts
    15
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Best options for .doc(x) libraries?

    Hi all,

    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?

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Anything you find is going to cost quite a bit because that's a proprietary format owned by Microsoft and they want their cut for any program that uses it.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Nov 2012
    Posts
    15
    Thanks
    2
    Thanked 0 Times in 0 Posts
    That's not really true.

    Their Word 2007 XML standard is well documented for example. I'm surprised there isn't a comprehensive PHP library for it yet.

  • #4
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    I haven't tried this one yet, but the PHPExcel library from the same people works well:
    https://github.com/PHPOffice/PHPWord

  • #5
    New Coder
    Join Date
    Nov 2012
    Posts
    15
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks for that. That's the one I've decided to work with for the moment.

    My only concern with that one is that it's still in beta and no development on it has occurred since 2011. I've already noticed a few quirks with it but I'll push on ahead with it until I have to change tack!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •