OutlineOptionsDefaultBookmarksOutlineLevel Property |
Namespace: Aspose.Words.Saving
Individual bookmarks level could be specified using BookmarksOutlineLevels property.
Specify 0 and Word bookmarks will not be displayed in the document outline. Specify 1 and Word bookmarks will be displayed in the document outline at level 1; 2 for level 2 and so on.
Default is 0. Valid range is 0 to 9.
Document doc = new Document(MyDir + "Bookmarks in headers and footers.docx"); // You can specify how bookmarks in headers/footers are exported // There is a several options for this: // "None" - Bookmarks in headers/footers are not exported // "First" - Only bookmark in first header/footer of the section is exported // "All" - Bookmarks in all headers/footers are exported PdfSaveOptions saveOptions = new PdfSaveOptions { HeaderFooterBookmarksExportMode = headerFooterBookmarksExportMode, OutlineOptions = { DefaultBookmarksOutlineLevel = 1 } }; doc.Save(ArtifactsDir + "PdfSaveOptions.HeaderFooterBookmarksExportMode.pdf", saveOptions);