Hi,
On Fri, 15 Feb 2002 07:42:57 +0800
"Michael Mok" <[EMAIL PROTECTED]> wrote:
> Hi Steffen,
>
> Mergfields are an identifier or special field name that you place in a RTF
> documents. eg
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> Dear <Guest.LastName>
>
> Welcome to <Accommodation.PropertyName>
>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
The user writes this identifiers in 'clear' text in it's text processing tool e.g.
Word, right?
In this case you cannot ensure, that the user don't inserts any special font handling
or other stuff inside of this identifier text.
The resulting rtf document than contains <G{\f2\fs20 uest.LastName}> or something else.
So don't forget to discipline your users. :-)=)
Back to the real problem:
iText don't have such support currently. But you are welcome to code that. :-)=)
I've solved this problem with apache jakarta regexp.
Because the rtf is 'normal' ascii text, you can perform a regular expression
substitution an the string '<Guest.LastName>' with the real value.
But the much better solution for all of us, they have spent much time and therfore
money in the development of iText, were to code it into the iText-Codebase. :-)
Regards
Steffen...
>
> As you can see, the user can setup a RTF document anyway they like and
> insert the merge fields. Then they can select a bunch of records (guest
> addresses) from the database and use a mail merge utility (hopefully iText)
> to insert the data into the document and produce personalised letters.
>
>
>
> Regards,
>
> Michael Mok
> www.teatimej.com
>
> ----- Original Message -----
> From: "Steffen Stundzig" <[EMAIL PROTECTED]>
> To: "Michael Mok" <[EMAIL PROTECTED]>
> Sent: Thursday, February 14, 2002 4:57 PM
> Subject: Re: [iText-questions] Mail merging with RTFWriter?
>
>
> > Hi michael,
> >
> > On Wed, 13 Feb 2002 23:54:38 +0800
> > "Michael Mok" <[EMAIL PROTECTED]> wrote:
> >
> > > Hi all
> > >
> > > Is it possible to use iText as a mail merge engine for RTF document? We
> > > created some RTF document with mergefields and we are using Word to
> perform
> > > mail merge.
> >
> > What do you mean with 'mergefields'? Could you explain this a little more
> detailed.
> >
> >
> > Regards
> > Steffen...
> >
> > --
> > ______________________________________________________________________
> > Steffen Stundzig mailto:[EMAIL PROTECTED]
> > SMB GmbH http://www.smb-tec.com
> >
> >
> >
> >
--
______________________________________________________________________
Steffen Stundzig mailto:[EMAIL PROTECTED]
SMB GmbH http://www.smb-tec.com
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions