Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-17-2022, 12:29 PM   #1
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 652
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
__________________
PublisherBucks
Wellness Affiliate Program.
Publisher Bucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2022, 03:47 PM   #2
zerovic
Confirmed User
 
zerovic's Avatar
 
Industry Role:
Join Date: Apr 2010
Posts: 1,018
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.
zerovic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-17-2022, 09:43 PM   #3
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 652
Quote:
Originally Posted by zerovic View Post
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
__________________
PublisherBucks
Wellness Affiliate Program.
Publisher Bucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-18-2022, 12:18 AM   #4
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,169
I think it's probably better if you use PDF
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-18-2022, 12:24 AM   #5
Paul&John
Confirmed User
 
Paul&John's Avatar
 
Industry Role:
Join Date: Aug 2005
Location: YUROP
Posts: 8,508
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
Paul&John is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-18-2022, 01:44 AM   #6
zerovic
Confirmed User
 
zerovic's Avatar
 
Industry Role:
Join Date: Apr 2010
Posts: 1,018
I used mPDF for invoice generation and it's pretty good.
zerovic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-18-2022, 03:21 AM   #7
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,169
I've used mPDF as well. Works well.

The council has decided - you are to use .pdf instead of .docx
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-18-2022, 05:37 AM   #8
ZTT
Confirmed User
 
ZTT's Avatar
 
Industry Role:
Join Date: Apr 2019
Posts: 657
Quote:
Originally Posted by Paul&John View Post
Yap.. any reason for choosing docx?
Because tomorrow's thread is: Convert docx to ePub or Kindle format?
__________________
__________________
ZTT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-18-2022, 07:53 AM   #9
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 652
Most eBook distributors prefer .docx format over PDF.

Google is pretty much the only distribution channel that accepts .pdf these days.
__________________
PublisherBucks
Wellness Affiliate Program.
Publisher Bucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
server, generating, document, .docx, generate, generation, job, formatting, day, documents, actual, stuff, 1-2, required, thumbsup, data, appreciated, based, stored, advice, database, sql, automatically, happen, cron



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.