<[EMAIL PROTECTED]> wrote:
>
> Quoting Rob Dixon <[EMAIL PROTECTED]>:
>
> > <[EMAIL PROTECTED]> wrote:
> >
> > Hi.
> >
> > A name would be nice...?
> >
> > All of the answers are in the module documentation. The code below shows
> > a lot of the common requirements. Anything else you can fish from the
> > POD.
> >
> > Sean, the author of the module, has written O'Reilly's "RTF Pocket Guide"
> > which I haven't seen but assume is still in print. It will be much more
> > comprehensive than the RTF::Cookbook POD.
> >
> > HTH,
> >
> > Rob
> >
> >
> >
> >   use strict;
> >   use warnings;
> >
> >   use RTF::Writer;
> >
> >   my $rtf = RTF::Writer->new_to_file("demo.rtf");
> >
> >   $rtf->prolog( fonts => ['Times New Roman', 'Courier New'] );
> >
> >   $rtf->print(\'\f0\fs24'); # Default to Font zero (Times) in 12 pt
> >
> >   $rtf->paragraph(
> >     \'\sa120',      # 6pt space after paragraph
> >     \'\b',          # Bold
> >     \'\ul',         # Underline
> >     "Title");
> >
> >   $rtf->paragraph;  # Blank First Paragraph
> >
> >   $rtf->paragraph(
> >     \'\sa120',
> >     "First text paragraph.");
> >
> >   $rtf->paragraph(
> >     \'\sa120',
> >     \'\f1',         # Font 1 (Courier)
> >     "Second text paragraph in Courier New",
> >     \'\line',
> >     "with an explicit line break.");
> >
> >   $rtf->paragraph(
> >     \'\sa120',
> >     "Third text paragraph reverts to default font zero.");
> >
> >   # Most arguments takes measurements in twips (twentieths of a point)
> >   # so \sa120 is a space-after of 6 points
> >   # Font Size takes measurements of half a point, so \fs16 is 8-point
> >   #
> >   $rtf->paragraph(
> >     \'\sa120',
> >     \'\f1',
> >     \'\fs16',       # Font size 8pt
> >     "Fourth text paragraph in Courier New 8pt ",
> >     "with no explicit line break but extended text ",
> >     "to show that automatic line wrapping applies ",
> >     "just as in Word."
> >     );
> >
> >   $rtf->paragraph(
> >     \'\sa120',
> >     "Fifth text paragraph.");
> >
> >   $rtf->close;
>
> This method would be perfect unless i had problem with the
> encoding. I want to write greek documents but i cannot.

Something like this may help:

  $rtf->prolog(
    fonts => ['Times New Roman', 'Courier New'],
    more_default => \'\deflang1253',
  );

which sets the default language to 1253 (Greek).
I can't try it out as I have only English fonts
installed. It's documented in the POD, which you
should really read.

If you're really stuck, try editing the resulting RTF
in WORD, changing the language to Greek, and writing
it as a new RTF file. Then you can see what has been changed.

Can't help you much further.

Rob



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to