Jan Je/lowicki Jasj at OZI.AR.WROC.PL
Mon Jun 28 19:00:44 CEST 2004

> From:           Alan Mead <cubrewer at yahoo.com>
> Subject:        Re: [fpc-pascal]RTF
> To:             fpc-pascal at lists.freepascal.org
> Send reply to:  fpc-pascal at lists.freepascal.org
> Date sent:      Mon, 28 Jun 2004 09:25:19 -0700 (PDT)

> --- David G Jenkins <davidgjenkins at ntlworld.com> wrote:
> > rtfpars
> >      Contains a RTF (Rich Text Format) parsing class. All that
> > needs to 
> > be done is set some event handlers and you can display RTF wherever
> > you 
> > want.
> > 
> > I would like to use this to generate RTF files but don't have any 
> > documentation about the functionality of this unit.
> I can't help with rtfpars but I have had luck in the past using
> templates.  RTF is pretty complicated and so constructing brand-new
> documents from scratch might be complex.  But if you just need to
> create a single kind of document, perhaps with some data changed,
> then you can often solve the problem much more simply by:  (1) create
> an RTF document in your favorite software; (2) Insert tags like
> ##ADDRESS1## where you want to substitute text; (3) read in the
> template and replace the tags with the text of your choice.
> If you have more slightly more complex needs... such as wanting to
> insert the text of a letter, then the RTF that marks up standard text
> is pretty simple, so:  (1) create the RTF file; (2) break it into a
> "header" part and a "tail" part; (3) examine the simple mark-up for
> the body and write your conversion routine.
> This approach has some advantages: it's quick and relatively simple
> and it practically garuantees that the generated RTF can be read
> properly by your favorite software.  But it can also be really
> cumbersome to change the template and it doesn't work if you need the
> fancy RTF features.
> There used to be a thick-ish RTF spec on the microsoft.com website
> that you could examine if you wanted a better understanding of RTF.
> -Alan
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

And if you only are able to to so, abandon RTF and turn into 
fully transparent an more flexible XML. Thre is a serious chance
    your-data --(your-app)--> xml --(standard xsl)--> rtf
scenario would be easier to handle.

With regards,

                                       Jan Jelowicki
                                       jasj at ozi.ar.wroc.pl
Wroclaw University of Agriculture    Akademia Rolnicza we Wroclawiu
Department of Mathematics            Katedra Matematyki

More information about the fpc-pascal mailing list