Forum Moderators: coopster

Message Too Old, No Replies

generating RTF file from PHP

         

kadnan

7:58 am on Aug 4, 2004 (gmt 0)

10+ Year Member



Hello

i have to write a program which will convert the data from database into RTF formal for downloading for users

i did find a link for rtf writing in php but that was very basic and doesn`t allow formatting like BOLD and alignment etc

i used file function to read a RTF file and it shows content along with header

but when i write same data by using fputs() it doesnt render the RTF specif code and it just sows the content in RTF

help me please

ergophobe

2:55 pm on Aug 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Does the host machine have Word installed? In that case you could open a COM wrapper and probably do anything Word can do.

Not that lucky? In that case you'll probably need to wade through the RTF Specification [msdn.microsoft.com] (also available here [latex2rtf.sourceforge.net]) to find out what you need to do.

Basically,

{This is RTF with }
{\b bold}{ text

I assume that was just one example of what you're trying to do, though.

WhosAWhata

3:07 pm on Aug 4, 2004 (gmt 0)

10+ Year Member



what do you mean by a com wrapper?

ergophobe

3:35 pm on Aug 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



On php and COM

[us3.php.net...]
[php.weblogs.com...]

And came up recently in this thread

[webmasterworld.com...]

Tom