呈现HTML以TIFF [英] Render HTML to TIFF
问题描述
我工作的地方规定要求进行应用程序产生HTML文档的TIFF图像存储在文档管理系统中的应用。我使用ASP.NET MVC 3,并很好奇,如果任何人都遇到了类似的要求,如果是这样,你怎么处理?
I'm working on an application where the requirements call for the app to produce a TIFF image of an HTML document for storage in a document management system. I'm using ASP.NET MVC 3 and am curious if anyone else has run into similar requirements, and if so, how did you address?
谢谢!
推荐答案
这个特定的解决方案并没有在 @ Select0r 的上述评论,我相信这是值得一提。
This particular solution wasn't suggested in @Select0r's comment above and I believe it's worth mentioning.
我最近碰到在codePLEX 这个库。它完全写在管理code没有和依赖关系,并提供了 HtmlRenderer.Render()
函数呈现到图形
对象。
I recently ran into this library on CodePlex. It's written completely in managed code without and dependencies and provides HtmlRenderer.Render()
function which renders to a Graphics
object.
您可以用它来呈现一些HTML到位图
,并保存为TIFF图像。
You can use it to render some HTML onto a Bitmap
and save it as a TIFF image.
不过,这个库仍是不完美的,并且只支持简单的布局。
However, this library still isn't perfect and only supports simple layouts.
这篇关于呈现HTML以TIFF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!