iTextSharp: Writing RTF in a PDF document

ⅰ亾dé卋堺 提交于 2019-12-24 10:38:19

问题


I'm using iTextSharp (with C# and VS2008) to generate a report from a database table row. Generate PDF is not a problem... but when I try to add RTF text into the PDF I cant't find a way into iTextSharp object structure.

How can I do it?

Thanks a lot!


回答1:


Consider converting your RTF to HTML and then writing your HTML to PDF using iTextSharp.

I've never done this but here are some resources that might help:
Writing Your Own RTF Converter
Need help with creating PDF from HTML using itextsharp




回答2:


Try to use iTextSharp.text.rtf.parser.RtfParser




回答3:


Try using HtmlToPdfBuilder class at www.hugoware.net from Hugo Bonacci. It shall convert HTML to PDF with external stylesheet as well.



来源:https://stackoverflow.com/questions/2823544/itextsharp-writing-rtf-in-a-pdf-document

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