Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save groupdocs-com-kb/5a03ac66b389c00c1e6a8a0751623957 to your computer and use it in GitHub Desktop.
Save groupdocs-com-kb/5a03ac66b389c00c1e6a8a0751623957 to your computer and use it in GitHub Desktop.
Convert ODT to MHTML using Node.js. For more information, please follow link: https://kb.groupdocs.com/conversion/nodejs/convert-odt-to-mhtml-using-nodejs/
const conversion = require('@groupdocs/groupdocs.conversion')
const licensePath = "GroupDocs.Conversion.lic";
const license = new conversion.License()
license.setLicense(licensePath);
// Load the input ODT file
const converter = new conversion.Converter("input.odt");
// Set the convert options for MHTML format
const options = new conversion.MarkupConvertOptions();
options.setFormat(conversion.MarkupFileType.Mhtml);
// Save output MHTML to disk
converter.convert("output.mhtml", options);
console.log('The end of process.');
process.exit(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment