in reply to Re^2: How to print a text document to RTF document
in thread How to print a text document to RTF document
Red and blue are defaults, for other colors you have to define a color table
#!/usr/bin/perl use strict; use RTF::Writer; my $output = 'c:/temp/colortext.rtf'; my $rtf = RTF::Writer->new_to_file($output); $rtf->prolog( 'title' => "Color Test", 'colors' => [ undef, [255,0,0], # 1-red [0,255,0], # 2-green [0,0,255], # 3-blue [255,128,0], # 4-orange ], ); $rtf->paragraph( \'\cf1',"This is Red" ); $rtf->paragraph( \'\cf2',"This is Green" ); $rtf->paragraph( \'\cf3',"This is Blue" ); $rtf->paragraph( \'\cf4',"This is Orange" ); $rtf->close;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to print a text document to RTF document
by mdavies23 (Acolyte) on Jul 11, 2017 at 11:16 UTC | |
by poj (Abbot) on Jul 11, 2017 at 12:19 UTC | |
by mdavies23 (Acolyte) on Jul 11, 2017 at 16:07 UTC | |
by poj (Abbot) on Jul 11, 2017 at 16:19 UTC | |
by mdavies23 (Acolyte) on Jul 11, 2017 at 16:31 UTC | |
| |
|
Re^4: How to print a text document to RTF document
by mdavies23 (Acolyte) on Jul 10, 2017 at 16:42 UTC | |
|
Re^4: How to print a text document to RTF document
by mdavies23 (Acolyte) on Jul 10, 2017 at 16:58 UTC | |
by poj (Abbot) on Jul 10, 2017 at 17:15 UTC | |
by mdavies23 (Acolyte) on Jul 10, 2017 at 17:59 UTC |