// This code example demonstrates how to convert a OneNote document to HTML and embed resources.
// Initialize OneNote document
Document doc = new Document("C:\\Files\\Sample1.one");

// Define HTML save options
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.setExportCss(ResourceExportType.ExportEmbedded);
htmlSaveOptions.setExportFonts(ResourceExportType.ExportEmbedded);
htmlSaveOptions.setExportImages(ResourceExportType.ExportEmbedded);
htmlSaveOptions.setFontFaceTypes(FontFaceType.Ttf);

// Save into HTML format
String dataDir = "C:\\Files\\ConvertWithEmbeddedResources.html";
doc.save(dataDir, htmlSaveOptions);