如何将HTML标记转换为RTF [英] how to convert html tags into RTF
本文介绍了如何将HTML标记转换为RTF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用C1Report Designer2.5设计pdf文件,并通过RTF编辑器提供输入.
我在富文本编辑器中输入的内容将生成为pdf文件.在编辑器中键入的文本在html标记中,因此我的pdf文件将html标记作为文本并显示.
因此,这与我键入的内容不完全相同.如何准确获取我输入的内容.
我用谷歌搜索,但没有得到我要寻找的东西.
请帮助我.
解决方案
您必须使用某种pdf库.我使用过iTextSharp和PdfSharp(均为开源),但是这些都没有满足您的要求.实际上,我从未见过将html转换为pdf并获得理想结果的pdf库.最好的pdf组件非常昂贵.
这是我能给您的最佳答案.希望有人能为您提供一个完美的html到pdf库的提示,但我对此表示怀疑..
看看这个演示,看看如何 ^ ],同时保留HTML表单中填充的值以及ASP.NET会话变量中存储的值
>i''m designing a pdf using C1Report Designer2.5 and giving the input through rich text editor.
what i''m typing in that rich text editor will be generated as pdf file. The text typed in editor is in html tags so my pdf file is taking html tags as text and displaying it.
So it is not exactly what i typed. How to get exactly what i typed in.
I google it but i don''t get what i''m exactly looking for.
Please help me.解决方案You have to use some sort of pdf-library. I have used iTextSharp and PdfSharp (both open source) but none of these is doing what you ask for. Actually I''ve never seen a pdf library which converts html to pdf with a perfect result. The best pdf-components are quite expensive.
This is the best answer I can give you. I hope someone can give you a hint for a perfect html to pdf library, but I doubt it..
Have a look at this demo to see how to convert html to pdf in C# and VB.NET [^] while preserving values filled in the HTML form and the values stored in the ASP.NET session variables
这篇关于如何将HTML标记转换为RTF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文