sridhar golyandla Posted June 4, 2009 Share Posted June 4, 2009 Hi to all, Is it possible to to create dynamic doc file and can we zip these doc file as zip archeive at a time doc file contains : Information abt for example an emp, information. if it is possible, how? Quote Link to comment https://forums.phpfreaks.com/topic/160908-dynamically-creating-doc-file/ Share on other sites More sharing options...
The Spook Posted June 4, 2009 Share Posted June 4, 2009 There are lots of zipping examples online: http://www.devco.net/archives/2005/05/24/creating_zip_files_with_php.php http://www.granthinkson.com/2005/07/01/create-zip-files-dynamically-using-php/ Creating a Word doc might prove to be more difficult unless you're hosting on Windows: http://stackoverflow.com/questions/124959/create-word-document-using-php-in-linux http://www.joelonsoftware.com/items/2008/02/19.html Quote Link to comment https://forums.phpfreaks.com/topic/160908-dynamically-creating-doc-file/#findComment-849215 Share on other sites More sharing options...
RClapham Posted June 4, 2009 Share Posted June 4, 2009 It's definitely possible, although making the documents Office 2007 files might be easier. DOCX files are basically just ZIP archives with XML documents inside. If it was just text that you wanted to send it'd probably be better to save them as .txt or .rtf as they're much easier to compose programatically (and are much smaller with regard to file size) than a Word Document. There is this: http://phpclasses.mirror.8086.net/browse/package/388.html But it's only for Windows as it uses COM. It's up to you. Though, zipping files is easy enough - the PHP website has a nice long document on it: http://uk.php.net/manual/en/class.ziparchive.php Quote Link to comment https://forums.phpfreaks.com/topic/160908-dynamically-creating-doc-file/#findComment-849223 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.