Alright... here's the beta version of my HTML -> MHTML conversion library. I am leaving the source code unlocked so you can look at it and modify it as necessary, but but I would really prefer to hear back on any issues so I can incorporate them.
A few notes about it...
- My real operating requirement here is to convert LabVIEW reports.
- With that in mind, there is no current support for content style sheets (.css). I can't imagine that would be hard to add though.
- For pictures, there is encoding support for .jpg, .gif, .bmp, .png
- Since all binary encoding is base64, it's pretty simple to expand encoding to files of other extensions--those are just the ones I could think of.
- The quoted-printable encoding, which is used for HTML and text files (and doesn't typically add an extra 1/3 to the file size like base64 encoding does), works, but isn't the greatest discriminator of when to make line breaks. For my tests, my reports have rendered just fine once they've been archived, but looking at the quoted-printable encoded HTML file within the .MHT archive it's just not quite as pretty as it is when IE does it.
Let me know how it works for you...