以编程方式生成.mht文件 [英] generate .mht file programmatically

查看:75
本文介绍了以编程方式生成.mht文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何在C#中以编程方式生成.mht文件吗?嵌入图像吗?事情是我已经意识到.mht文件能够将图像嵌入其中,并且这种嵌入的图像更改文件的位置时,它会与整个文件(mht)一起移动.和可以在不同的浏览器(包括IE 6)上查看此文件.

Does anybody know how to generate .mht file programmatically in C#, with embedded images in it? The thing is i have realised that .mht files are capable of embedding images in them, and this embedded images moves with the whole file(mht) when you change its location. And this file can be viewed on different browsers, including IE 6.

有人告诉我尝试使用Data Url Scheme技术.但这行不通,因为其他浏览器不支持.例如IE 6.

I was told to try Data Url Scheme technique. But it couldn't work because its not supported by other browsers. e.g IE 6.

推荐答案

这是可能的,而且肯定已经由其他人完成了-相关的材料和库/源代码:

It is possible and has definitely been done by others - relevant material and libraries/source code:

  • RFC 2557 is the foundation of MHT format
  • VB.NET source code for generating MHT files from an URL
  • Chilkat MHT .NET library (commercial)
  • ASPNetMHT (commercial)
  • C# source code for generating MHT files from an URL
  • CDO.Message COM component, which exposes the IMessage interface

这篇关于以编程方式生成.mht文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆