React Native
React Native
Save Web Page to MHT String
See more MHT / HTML Email Examples
Downloads a web page into a string variable containing MHT. MHT is a web archive with all images and style sheets embedded. It's a MIME-formatted text document. When saved with the .mht extension, Internet Explorer can open and display the page.Chilkat React Native Downloads
import { Mht } from '@chilkat/react-native'
async function chilkatExample() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
const mht = new Mht();
try {
const mhtStr = await mht.getMHTAsync('http://www.google.com/');
console.log(mhtStr);
} catch {
console.log(mht.lastErrorText);
}
}