nigelf Posted October 18, 2006 Share Posted October 18, 2006 Hi! I have discovered I can create Word documents in PHP usingheader("Content-Type: application/msword");header("content-disposition: attachment;filename=myfile.doc");But I now need to format the documents by setting the Font (it seems to default to courier - I'd like Times Roman), making text Bold, setting Tabs and Page breaks, inserting Graphics.Greatful for any help - thanks. Quote Link to comment Share on other sites More sharing options...
printf Posted October 18, 2006 Share Posted October 18, 2006 That does not create a ms word document, all that does is tell the browser that you are sending content that represents a document that is in the format of a ms word document! You need to create the document before trying to send it. How you create the document will be dependent on the system you are running on, as PHP has no core function list that can create any typr of ms word documents!me! Quote Link to comment Share on other sites More sharing options...
nigelf Posted October 18, 2006 Author Share Posted October 18, 2006 I'm running PHP 5.0.3; Apache 2.0; Windows XP - is that the answer to your question?Thanks Nigelf Quote Link to comment Share on other sites More sharing options...
printf Posted October 18, 2006 Share Posted October 18, 2006 If you have MS Word installed on your system, then you can access MS Word, via PHP(s) COM interface. If you have it installed, tell me and I will give a simple example of creating a document and then allow you to download it or save it to add more stuff (images, pages) later...me! Quote Link to comment 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.