atiqkhan Posted May 6, 2010 Share Posted May 6, 2010 Hi All! I have doc ( word ) file which has a watermark in it . I want to append some text in it so that the text comes in front of Watermark . In other words , there is a background image in a word file , in front of which I want to append some text and then want to send that word as an attachment . I have tried the following but the text not appending due to watermark in it . Please any body can help me ..... Thanks in advance.... I am using this .... $msg="I am testing. I am testing. I am testing. I am testing. I am testing. I am testing. I am testing. I am testing. I am testing. I am testing. I am testing. I am testing. I am testing. I am testing. I am testing. I am testing. "; $my_file = "frank.doc"; $ourFileHandle = fopen($my_file, 'a'); fwrite($ourFileHandle, $msg); fclose($ourFileHandle); PLease note the file frank.doc contains watermark . Its totally PHP.... The Doc file is attached... [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/200921-watermark-problem-in-appending/ Share on other sites More sharing options...
Psycho Posted May 6, 2010 Share Posted May 6, 2010 Word docs are not plain text documents. You can't simply "write" text to the dcoument. Prior to Office 2007 word docs were stored in a proprietary format. Starting with 2007 they are being stored in an XML format. You will need to write the data in a format that is appropriate to the document you have. I think your only option is going to be to find a class or some third-party plug-in that allows you to modify word documents. Quote Link to comment https://forums.phpfreaks.com/topic/200921-watermark-problem-in-appending/#findComment-1054229 Share on other sites More sharing options...
atiqkhan Posted May 6, 2010 Author Share Posted May 6, 2010 Can you please tell me how can I do that? Quote Link to comment https://forums.phpfreaks.com/topic/200921-watermark-problem-in-appending/#findComment-1054234 Share on other sites More sharing options...
Psycho Posted May 6, 2010 Share Posted May 6, 2010 You mean "find a class or some third-party plug-in"? http://lmgtfy.com/?q=php+edit+word+doc Quote Link to comment https://forums.phpfreaks.com/topic/200921-watermark-problem-in-appending/#findComment-1054362 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.