A
Anonymous
Guest
Hi PHP'ers,
I am building a web page that takes user input and generates an RTF file, which the user can then preview/print from the browser. Not as easy as it sounds; at least not for me.
I used the PHP 'echo' command to display the RTF file in the browser, but it's not working cleanly. I want it to show the 'interpreted' file output, but it only shows the raw uninterpreted RTF file from the echo command, and it only does that after prompting me with a dialogue box to open or save it.
I have inserted 'header(content-type: application/rtf)' in the hopes that it will open the right application on the server side. When testing in local mode (using Apache minixampp) it actually opens Word but does not close the raw RTF browser window. In live mode on a host provider, it opens Dreamweaver.
Is there any simple way to display an RTF file in the browser, in formatted output and without those annoying dialogue boxes?
I am building a web page that takes user input and generates an RTF file, which the user can then preview/print from the browser. Not as easy as it sounds; at least not for me.
I used the PHP 'echo' command to display the RTF file in the browser, but it's not working cleanly. I want it to show the 'interpreted' file output, but it only shows the raw uninterpreted RTF file from the echo command, and it only does that after prompting me with a dialogue box to open or save it.
I have inserted 'header(content-type: application/rtf)' in the hopes that it will open the right application on the server side. When testing in local mode (using Apache minixampp) it actually opens Word but does not close the raw RTF browser window. In live mode on a host provider, it opens Dreamweaver.
Is there any simple way to display an RTF file in the browser, in formatted output and without those annoying dialogue boxes?