Last active
November 17, 2022 11:18
-
-
Save groupdocs-com-kb/a9a3bcf9cfbc79081dd7edb6cc36dca2 to your computer and use it in GitHub Desktop.
How to Convert MHTML to HTML in Java. For more information, please follow link: https://kb.groupdocs.com/conversion/java/how-to-convert-mhtml-to-html-in-java/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.groupdocs.conversion.Converter; | |
| import com.groupdocs.conversion.licensing.License; | |
| import com.groupdocs.conversion.options.convert.MarkupConvertOptions; | |
| public class ConvertMhtmlToHtmlInJava { | |
| public static void main(String[] args) { // Main function to convert MHTML to MHTML in Java | |
| // Remove the watermark in output HTML document by adding license | |
| License lic = new License(); | |
| lic.setLicense("GroupDocs.Conversion.lic"); | |
| // Load the source MHTML file for conversion to HTML | |
| Converter converter = new Converter("sample.mhtml"); | |
| // Set the convert options for HTML format | |
| MarkupConvertOptions options = new MarkupConvertOptions(); | |
| // Convert and save the MHTML in HTML format | |
| converter.convert("converted.html", options); | |
| System.out.println("Done"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment