iTextSharp可以打开RTF文档,对其进行操作,并将文档导出为PDF吗? [英] Can iTextSharp open an RTF document, manipulate it, and export the document to PDF?

查看:158
本文介绍了iTextSharp可以打开RTF文档,对其进行操作,并将文档导出为PDF吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用iTextSharp(和c#/ ASP.NET)可以打开RTF文档,通过替换某些文本,插入图像(WMF或PNG)以及将操作文档导出到保留的PDF文档来对其进行操作原始RTF文档的格式化?

Using iTextSharp (and c#/ASP.NET) is it possible to open an RTF document, manipulate it by replacing some text, insert an image (WMF or PNG), and the export that manipulated document to a PDF document that retains the formatting of the original RTF document?

基本上我希望创建一个简单的邮件合并解决方案,模板在RTF中,输出需要在PDF中。这需要在ASP.NET服务器上运行。

Essentially I'm hoping to create a simple mail merge solution with the template being in RTF and the output needing to be in PDF. This needs to run on an ASP.NET server.

推荐答案

用iTextSharp本身是不可能的。更好的方法是使用Word Object打开文档,执行mailmerge然后将这些文档保存为HTML。现在您可以使用iTextSharp来解析html并创建PDF。

No it is not possible per se with iTextSharp. Better approach will be to use Word Object to open document, do mailmerge and then save those documents ad HTML. Now you can use iTextSharp to parse html and create PDF.

这篇关于iTextSharp可以打开RTF文档,对其进行操作,并将文档导出为PDF吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆