Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 3. Example Programs

Chapter 3. Example Programs

So far, this book has approached RTF as a format that means something in and of itself. But RTF, like any document format, makes sense only in terms of how it is used—namely, how it is formatted and read. The issue of parsing RTF is larger than can be dealt with in this brief guide, but these simple RTF-generating programs demonstrate the basic issues involved in having programs that write RTF documents. The examples are of simple utilities that each use some particular features of RTF.

The programs are all in relatively simple Perl, with an explanation before each, and comments in the code. If you want to generate your own RTF documents from Perl, have a look at the helpful RTF-writing modules in CPAN (located at http://search.cpan.org), notably RTF::Writer and RTF::Generator. I don’t actually use these modules in the following examples, because the examples simply demonstrate RTF without detouring through the APIs of the RTF-writing modules.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial