views:

1227

answers:

3

Hi all,

Currently I'm working on simple Mail-Merge module.

What I need is to load plain *.RTF template, then replace all words enclosed in [[field]] tags and at the end - print them out.

I found iText library which is free and capable of loading/saving pdfs and rtf. I managed to load rtf, merge a few copies to one huge doc but I have no idea how to replace [[field]] by custom data like customer name/address.

Is that feature present, and if yes - how to do it?

Thanks in advance

Tomasz

EDIT: solution platform is c#/.NET

A: 

I don't think that pdf is the way you want to go.

According to this article it is extremely difficult at best and not possible at worst.

Would something like RTFLib work better for you?

G-Man

GeoffreyF67
A: 

@G-Man: RTF, not PDF; moreover - the solution should be in c#/net.

tomo
A: 

Finally I decided to use *.docx and "Open XML SDK 2.0 for Microsoft Office" .NET strongly typed wrapper.

tomo