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.
How to convert HTML to RTF in Perl?
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.
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? –
Goldfish
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. –
Feer
Sam: I guess you use an old version of Perl, before 5.8. You should report this bug here: rt.cpan.org/Public/Dist/Display.html?Name=HTML-Parser –
Diaconicon
I use 5.6.1 for Perl and I am using 3.64 for Parser. OS is Solaris 8 –
Goldfish
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 backpan.perl.org/authors/id/G/GA/GAAS that may work better with your ancient Perl.) –
Feer
© 2022 - 2024 — McMap. All rights reserved.