![]() |
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 :thumbsup |
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.
|
Quote:
|
I think it's probably better if you use PDF
|
Yap.. any reason for choosing docx?
|
I used mPDF for invoice generation and it's pretty good.
|
I've used mPDF as well. Works well.
The council has decided - you are to use .pdf instead of .docx :thumbsup |
Quote:
|
Most eBook distributors prefer .docx format over PDF.
Google is pretty much the only distribution channel that accepts .pdf these days. |
All times are GMT -7. The time now is 03:05 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc