Render RTF document as an image on the web
I have many RTF d开发者_StackOverflow中文版ocuments storend in my database. I'm trying to create a webpage to render an RTF document as an image. Any ideas on how to do this?
You can try printing to a Virtual Image Printer and then serve the image it produced.
See this project
http://sourceforge.net/projects/rtf2html/ (Also cf. http://www.w3.org/Tools/HTMLGeneration/rtf2html.html)
Also see this question answered a year ago:
Convert Rtf to HTML
It includes a C# option on codeproject
The easier way is convert RTF to HTML instead of image, because of:
- Image is a raster and will look different in various monitors
- Image has more size (kb) than HTML
- Converting to Image in even case slower than to HTML
精彩评论