HTML to Image .tiff File

陌路散爱 提交于 2019-12-09 03:38:29

问题


Is there a way to convert a HTML string into a Image .tiff file?

I am using C# .NET 3.5. The requirement is to give the user an option to fact a confirmation. The confirmation is created with XML and a XSLT. Typically it is e-mailed.

Is there a way I can take the HTML string generated by the transformation HTML string and convert that to a .tiff or any image that can be faxed?

3rd party software is allowed, however the cheaper the better.

We are using a 3rd party fax library, that will only accept .tiff images, but if I can get the HTML to be any image I can covert it into a .tiff.


回答1:


Here are some free-as-in-beer possibilities:

You can use the PDFCreator printer driver that comes with ghostscript and print directly to a TIFF file or many other formats.

If you have MSOffice installed, the Microsoft Office Document Image Writer will produce a file you can convert to other formats.

But in general, your best bet is to print to a driver that will produce and image file of some kind or a windows meta-file format (.wmf) file.

Is there some reason why you can't just print-to-fax? Does the third-party software not support a printer driver? That's unusual these days.




回答2:


A starting point might be the software of WebSuperGoo, which provide rich image editing products, cheap or for free.

I know for sure their PDF Writer can do basic HTML (http://www.websupergoo.com/helppdf6net/source/3-concepts/b-htmlstyles.htm). This should not be too hard to convert to TIFF.

This does not include the full HTML subset or CSS. That might require using Microsofts IE ActiveX component.



来源:https://stackoverflow.com/questions/53956/html-to-image-tiff-file

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