Thread

Posted on Mon Sep 26 20:58:38 2005 by nareval
HTML - malformed Headers using RTF
I am using this module for the first time. does anyone have an example of how to create/open an rtf document in a browser? I have created a webpage. My users want to be able to download the webpage as a RTF document. I am getting a HTML error of malformed headers. Here is all I've put into the code so far: $rtf = $cgi->param('rtf') || 0; if ($rtf) { ConnectDB($title,$dbname_sla); $h = RTF::Writer->new_to_handle(*STDOUT ); $h->prolog( 'title' => "Greetings, hyoomon" ); $h->print ("{Stuff\n\t\tUmmm\n}"); $h->close; exit; }
Direct Responses: 1071 | Write a response
Posted on Wed Sep 28 20:27:02 2005 by nareval in response to 1040
Re: HTML - malformed Headers using RTF
I have since changed the header to: $rtf_filename = "root_cause-$daterange.rtf"; print ("Content-type: application/rtf\n"); print ("Content-Disposition: attachment; filename=$rtf_filename\n"); $h = RTF::Writer->new_to_handle(*STDOUT); $h->prolog( 'title' => "Greetings, hyoomon" ); $h->number_pages; $h->paragraph(\'\fs40\b\i', "Hi there!"); $h->close; I still malformed headers with this error: malformed header: {\rtfi\ansi\deff0{\fonttbl
Write a response