6

I want a way to convert some basic html tags into RTF (like I, B, BR) Is there any simpler way to do that without paying for anything? Developing something from scratch is an option too.

Sam
  • 243
  • 1
  • 9
  • 22

1 Answers1

7

Have you tried HTML::FormatRTF? I haven't used the RTF output, but I've used the plain text output (HTML::FormatText) and was happy with it.

cjm
  • 61,471
  • 9
  • 126
  • 175
  • Thanks cjm, This looks promising. But I am stuck with this. HTML::Format depends on HTML::Tree and HTML::Tree depends on HTML::Parser. While doing 'make test' for HTML::Parser i got following error: t/entities...........NOK 17# Failed test (t/entities.t at line 74) # got: 'Attention Homeοωnөrs...1ѕt Tімe Eνөг' # expected: 'Attention HomeοÏnÓ©rs...1Ñt TÑмe Eνөг' # Looks like you failed 1 test of 17 I verified that i satisfy pre-requisites for installing this module. Any idea about this error? – Sam Feb 17 '10 at 02:43
  • HTML::Parser is a heavily used module; it should work fine. Are you using the current version (3.64)? If you can't get it to work, post another question giving details of your Perl installation, OS, and error message. Comments aren't a suitable medium to diagnose it. – cjm Feb 17 '10 at 03:47
  • Sam: I guess you use an old version of Perl, before 5.8. You should report this bug here: https://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Parser – Alexandr Ciornii Feb 17 '10 at 04:47
  • I use 5.6.1 for Perl and I am using 3.64 for Parser. OS is Solaris 8 – Sam Feb 17 '10 at 18:38
  • Well, HTML::Parser still claims to support 5.6, so report the bug as Alexandr suggested. But you really ought to upgrade your Perl; 5.6.1 is almost 9 years old now. Lots of current modules don't support it at all. (You can get older versions of HTML::Parser from http://backpan.perl.org/authors/id/G/GA/GAAS/ that may work better with your ancient Perl.) – cjm Feb 17 '10 at 19:10