Can iTextSharp open, manage, and export an RTF document to PDF?

Using iTextSharp (and C # / ASP.NET), can I open an RTF document, process it by replacing some text, insert an image (WMF or PNG) and export a document that processes a PDF document that preserves the formatting of the original RTF document?

In fact, I hope to create a simple solution for merging with a template located in RTF, and the output should be in PDF format. This must be run on the ASP.NET server.

0
source share
2 answers

No, this is not possible for iTextSharp. A better approach would be to use Word Object to open a document, execute mailmerge, and then save these documents in HTML format. Now you can use iTextSharp to parse html and create PDF.

+2
source

To parse an RTF document, you can use a cool library called RtfDomParser . It creates a hierarchical tree of your RTF document, which you can parse to create (manually) a PDF file.

0
source

All Articles