Generate .docx file on server?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Publisher Bucks
    Confirmed User
    • Oct 2018
    • 1339

    #1

    Tech Generate .docx file on server?

    I currently have a .php program that wil 'spin' a bunch of recipe books and display the contents on a web page to copy and paste into a document (docx format).

    How would I go about generating the output directly into a pre-formatted Word document template (in terms of headings, font sizes, etc) and have that upload to a drectory on my server automagically?

    I'm assuming some type of cron job would be required in order to generate 1-2 documents a day, but the actual formatting stuff and generation, what do I need to look into in order to make that happen?

    I'm not really finding much information about generating a .docx onto the server automatically based on data stored in an SQL database :/

    Any advice would be appreciated
    Extreme Link List - v1.0
  • zerovic
    Confirmed User
    • Apr 2010
    • 1114

    #2
    Simple. Like you said, you'll need a cron job for this to automate things and use any PHP class to generate docx files. You simply render everything into HTML format and, without even displaying the page, generate the docx files. Search for htmltodocx on github for example.
    php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com

    Comment

    • Publisher Bucks
      Confirmed User
      • Oct 2018
      • 1339

      #3
      Originally posted by zerovic
      Simple. Like you said, you'll need a cron job for this to automate things and use any PHP class to generate docx files. You simply render everything into HTML format and, without even displaying the page, generate the docx files. Search for htmltodocx on github for example.
      Thank you
      Extreme Link List - v1.0

      Comment

      • k0nr4d
        Confirmed User
        • Aug 2006
        • 9231

        #4
        I think it's probably better if you use PDF
        Mechanical Bunny Media
        Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development

        Comment

        • Paul&John
          Confirmed User
          • Aug 2005
          • 8619

          #5
          Yap.. any reason for choosing docx?
          Use coupon 'pauljohn' for a $1 discount at already super cheap NameSilo!
          Anal Webcams | Kinky Trans Cams Live | Hotwife XXX Tube | Get your Proxies here

          Comment

          • zerovic
            Confirmed User
            • Apr 2010
            • 1114

            #6
            I used mPDF for invoice generation and it's pretty good.
            php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com

            Comment

            • k0nr4d
              Confirmed User
              • Aug 2006
              • 9231

              #7
              I've used mPDF as well. Works well.

              The council has decided - you are to use .pdf instead of .docx
              Mechanical Bunny Media
              Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development

              Comment

              • ZTT
                Confirmed User
                • Apr 2019
                • 659

                #8
                Originally posted by Paul&John
                Yap.. any reason for choosing docx?
                Because tomorrow's thread is: Convert docx to ePub or Kindle format?
                __________________

                Comment

                • Publisher Bucks
                  Confirmed User
                  • Oct 2018
                  • 1339

                  #9
                  Most eBook distributors prefer .docx format over PDF.

                  Google is pretty much the only distribution channel that accepts .pdf these days.
                  Extreme Link List - v1.0

                  Comment

                  Working...