Aspose::Words::Saving::OutlineOptions class

OutlineOptions class

Allows to specify outline options. To learn more, visit the Save a Document documentation article.

class OutlineOptions : public System::Object

Methods

MethodDescription
get_BookmarksOutlineLevels() constAllows to specify individual bookmarks outline level.
get_CreateMissingOutlineLevels() constGets or sets a value determining whether or not to create missing outline levels when the document is exported. Default value for this property is false.
get_CreateOutlinesForHeadingsInTables() constSpecifies whether or not to create outlines for headings (paragraphs formatted with the Heading styles) inside tables.
get_DefaultBookmarksOutlineLevel() constSpecifies the default level in the document outline at which to display Word bookmarks.
get_ExpandedOutlineLevels() constSpecifies how many levels in the document outline to show expanded when the file is viewed.
get_HeadingsOutlineLevels() constSpecifies how many levels of headings (paragraphs formatted with the Heading styles) to include in the document outline.
GetType() const override
Is(const System::TypeInfo&) const override
OutlineOptions()
set_CreateMissingOutlineLevels(bool)Setter for Aspose::Words::Saving::OutlineOptions::get_CreateMissingOutlineLevels.
set_CreateOutlinesForHeadingsInTables(bool)Setter for Aspose::Words::Saving::OutlineOptions::get_CreateOutlinesForHeadingsInTables.
set_DefaultBookmarksOutlineLevel(int32_t)Setter for Aspose::Words::Saving::OutlineOptions::get_DefaultBookmarksOutlineLevel.
set_ExpandedOutlineLevels(int32_t)Setter for Aspose::Words::Saving::OutlineOptions::get_ExpandedOutlineLevels.
set_HeadingsOutlineLevels(int32_t)Setter for Aspose::Words::Saving::OutlineOptions::get_HeadingsOutlineLevels.
static Type()

Examples

Shows to process bookmarks in headers/footers in a document that we are rendering to PDF.

auto doc = MakeObject<Document>(MyDir + u"Bookmarks in headers and footers.docx");

// Create a "PdfSaveOptions" object that we can pass to the document's "Save" method
// to modify how that method converts the document to .PDF.
auto saveOptions = MakeObject<PdfSaveOptions>();

// Set the "PageMode" property to "PdfPageMode.UseOutlines" to display the outline navigation pane in the output PDF.
saveOptions->set_PageMode(PdfPageMode::UseOutlines);

// Set the "DefaultBookmarksOutlineLevel" property to "1" to display all
// bookmarks at the first level of the outline in the output PDF.
saveOptions->get_OutlineOptions()->set_DefaultBookmarksOutlineLevel(1);

// Set the "HeaderFooterBookmarksExportMode" property to "HeaderFooterBookmarksExportMode.None" to
// not export any bookmarks that are inside headers/footers.
// Set the "HeaderFooterBookmarksExportMode" property to "HeaderFooterBookmarksExportMode.First" to
// only export bookmarks in the first section's header/footers.
// Set the "HeaderFooterBookmarksExportMode" property to "HeaderFooterBookmarksExportMode.All" to
// export bookmarks that are in all headers/footers.
saveOptions->set_HeaderFooterBookmarksExportMode(headerFooterBookmarksExportMode);

doc->Save(ArtifactsDir + u"PdfSaveOptions.HeaderFooterBookmarksExportMode.pdf", saveOptions);

See Also