Aspose::Words::Saving::HtmlSaveOptions::get_NavigationMapLevel method
HtmlSaveOptions::get_NavigationMapLevel method
Specifies the maximum level of headings populated to the navigation map when exporting to EPUB, MOBI, or AZW3 formats. Default value is %3.
int32_t Aspose::Words::Saving::HtmlSaveOptions::get_NavigationMapLevel() const
Remarks
The navigation map allows user agents to provide an easy way of navigation through the document structure. Usually navigation points correspond to headings in the document. In order to populate headings up to level N assign this value to NavigationMapLevel.
By default, three levels of headings are populated: paragraphs of styles Heading 1, Heading 2 and Heading 3. You can set this property to a value from 1 to 9 in order to request the corresponding maximum level. Setting it to zero will reduce the navigation map to only the document root or roots of document parts.
Examples
Shows how to generate table of contents for Azw3 documents.
auto doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Big document.docx");
auto options = System::MakeObject<Aspose::Words::Saving::HtmlSaveOptions>(Aspose::Words::SaveFormat::Azw3);
options->set_NavigationMapLevel(2);
doc->Save(get_ArtifactsDir() + u"HtmlSaveOptions.CreateAZW3Toc.azw3", options);
Shows how to generate table of contents for Mobi documents.
auto doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Big document.docx");
auto options = System::MakeObject<Aspose::Words::Saving::HtmlSaveOptions>(Aspose::Words::SaveFormat::Mobi);
options->set_NavigationMapLevel(5);
doc->Save(get_ArtifactsDir() + u"HtmlSaveOptions.CreateMobiToc.mobi", options);
See Also
- Class HtmlSaveOptions
- Namespace Aspose::Words::Saving
- Library Aspose.Words for C++