> From:           Alan Mead <[EMAIL PROTECTED]>
> Subject:        Re: [fpc-pascal]RTF
> To:             [EMAIL PROTECTED]
> Send reply to:  [EMAIL PROTECTED]
> Date sent:      Mon, 28 Jun 2004 09:25:19 -0700 (PDT)

> --- David G Jenkins <[EMAIL PROTECTED]> 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  -  [EMAIL PROTECTED]
> 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
that 
    your-data --(your-app)--> xml --(standard xsl)--> rtf
scenario would be easier to handle.

With regards,


                                       Jan Jelowicki
                                       [EMAIL PROTECTED]
                         
-------------------------------------------------------------------
Wroclaw University of Agriculture    Akademia Rolnicza we Wroclawiu
Department of Mathematics            Katedra Matematyki
-------------------------------------------------------------------

_______________________________________________
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to