in reply to starting RTF Writer

Hi weirat,

(on winxp and using MS Word to open the rtf)

I could only get the example from the docs to work if I added an extra number to the widths (but see update2 below).

This of course produced a three column, three row table. The docs show a table with: first row two column, second row three columns and third row two columns.

The underline and the bullet showed fine.

hth

#!/usr/local/bin/perl use strict; use warnings; use RTF::Writer; my $rtf = RTF::Writer->new_to_file("greetings.rtf"); $rtf->prolog( 'title' => "Greetings, hyoomon" ); my $decl = RTF::Writer::TableRowDecl->new('widths' => [1500,1900, 1500 +]); $rtf->row($decl, "Stuff", "Hmmm"); $rtf->row($decl, [\'\ul', 'Foo'], 'Bar', \'\bullet'); $rtf->row($decl, "Hooboy.");
update:
Forgot to say that it didn't work at all without the $rtf->prolog(...) call.

update2:
A bit more fiddling and the following did reproduce the table shown in the docs

#!/usr/local/bin/perl use strict; use warnings; use RTF::Writer; my $rtf = RTF::Writer->new_to_file("greetings.rtf"); $rtf->prolog( 'title' => "Greetings, hyoomon" ); my $decl; $decl = RTF::Writer::TableRowDecl->new('widths' => [1500,1900]); $rtf->row($decl, "Stuff", "Hmmm"); $decl = RTF::Writer::TableRowDecl->new('widths' => [1500,1900,1500]); $rtf->row($decl, [\'\ul', 'Foo'], 'Bar', \'\bullet'); $decl = RTF::Writer::TableRowDecl->new('widths' => [1500,1900]); $rtf->row($decl, "Hooboy.");