By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,279 Members | 1,606 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,279 IT Pros & Developers. It's quick & easy.

executing unrtf to convert rtf to html using perl

P: 44
hi everyone.i want to convert rtf file to html so that people can view file in an html format on the site can anyone give me the idea of how to do it.i want to use perl to execute unrtf software to do the job.
if someone have a code or something that can help me i will be glad.
Jan 9 '08 #1
Share this Question
Share on Google+
5 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
hi everyone.i want to convert rtf file to html so that people can view file in an html format on the site can anyone give me the idea of how to do it.i want to use perl to execute unrtf software to do the job.
if someone have a code or something that can help me i will be glad.
First, when asking how to do something, it is customary to post the code you have tried. That way, we can help you with what you have been working on.

Second, you will want to investigate the system() function.

Regards,

Jeff
Jan 9 '08 #2

P: 44
what i want to know is do i need to create the code to execute unrtf or do i need call the system function to do so.because i did'nt use unrtf before so i want to try to use it to convert rtf to html.
Jan 9 '08 #3

numberwhun
Expert Mod 2.5K+
P: 3,503
what i want to know is do i need to create the code to execute unrtf or do i need call the system function to do so.because i did'nt use unrtf before so i want to try to use it to convert rtf to html.
Well, if you are wanting to create a script to run the system utility "unrtf" on a supplied file name, then yes, you would write code. If you are just trying to convert a file, run the command directly.

I would play with unrtf and get its syntax correct before putting it in a script. Also, please clarify exactly what it is you are wanting.

Regards,

Jeff
Jan 9 '08 #4

P: 44
basically i want the user to upload an rtf file from the html form.
after that the file must be converted to html format.
since perl have power to use unrtf i want to call the perl function from php.

example

$filename = "file from html and php ";
$html = "file expected by php";
system("unrtf **html $FileName > $html_FileName") ;
Jan 9 '08 #5

KevinADC
Expert 2.5K+
P: 4,059
PHP can run system applications too, there is no need to use perl. Ask on a php forum how to run system applications.
Jan 9 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.