OutlineOptionsDefaultBookmarksOutlineLevel Property

Specifies the default level in the document outline at which to display Word bookmarks.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public int DefaultBookmarksOutlineLevel { get; set; }

Property Value

Type: Int32
Remarks

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.

Examples
Shows how bookmarks in headers/footers are exported to pdf.
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);
See Also