Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Displaying RTF string to browser

by bart (Canon)
on Aug 21, 2007 at 16:38 UTC ( [id://634127]=note: print w/replies, xml ) Need Help??


in reply to Displaying RTF string to browser

You're just creating an RTF file (file name in $rtfReport). You're not actually doing anything with that file after it's done.

You should print its contents to STDOUT.

Replies are listed 'Best First'.
Re^2: Displaying RTF string to browser
by ikkon (Monk) on Aug 21, 2007 at 17:05 UTC
    I tried
    $fh->close(); print STDOUT $RTF_obj;
    and once the file opens in word I get a error document name or path is not valid
      That's a start. But you're printing the file name, not the file contents.

      Try, hmm... How to make this easy? OK, let's stick to general cross-platform solution: RTF is text, so we'll just print the text of the file to STDOUT line by line.

      open IN, $RTF_obj or die "Oops?"; while(<IN>) { print; }
        ok, tried that, and a few variations, I don't get a error so thats a plus, but I get a blank RTF not sure why though. not to familuar with creating streaming rtf.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://634127]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found