Free RTF to PDF .NET component or tool? [closed]

删除回忆录丶 提交于 2019-12-07 22:58:19

问题


I am trying to convert a RTF file to a PDF. All tools I found so far cost a lot of money. Is there a tool which I could call or component I could use which converts existing RTF files to PDFs? If its a tool, it should have command line support so I can call it from the code. I am using C#...

Thanks


回答1:


I wrote a class to do this using the Office Interop assemblies. If you have MS Word installed on the machine executing the code, this works well. http://brandonzeider.me/2010/microsoft-net/convert-word-to-pdf/




回答2:


Yes, iTextSharp can't convert RTF to PDF, but it seems it can convert HTML to PDF. Maybe you can convert your RTF to HTML and next give it to iTextSharp. There is a free RTF to HTML tools in Internet.




回答3:


You can do the conversion in two steps:

  1. Parse the RTF data
  2. Write the PDF document

For the first step I have written this library. For the second step I have used a commercial product, but any open source library should also work.




回答4:


You could use iTextSharp to create pdf documents.



来源:https://stackoverflow.com/questions/5596452/free-rtf-to-pdf-net-component-or-tool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!