Reputation: 915
I have some generated .html
reports in a folder and want to convert multiple .html
, .css
, .js
and image files into one report.mhtml
file so that single file can be accessed as a web service.
Is there any Java API to convert the folder of .html
files to a single .mhtml
file?
Upvotes: 1
Views: 2880
Reputation: 316
I was investigating the reverse (unpacking an MHTML/EML to files) and while there didn't seem to be a simple Java-based utility to do this, I found the Apache Mime4J libraries to be very useful (and easier than JavaMail).
You can find the code I shared here: How to read or parse MHTML (.mht) files in java
For your case, to build an MHTML, if you can't find anything simpler, approach could be:
Upvotes: 2