OutlineOptionsExpandedOutlineLevels Property

Specifies how many levels in the document outline to show expanded when the file is viewed.

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

Property Value

Type: Int32
Remarks

Note that this options will not work when saving to XPS.

Specify 0 and the document outline will be collapsed; specify 1 and the first level items in the outline will be expanded and so on.

Default is 0. Valid range is 0 to 9.

Examples
Converts a whole document to PDF with three levels in the document outline.
Document doc = new Document(MyDir + "Rendering.docx");

PdfSaveOptions options = new PdfSaveOptions();
options.OutlineOptions.HeadingsOutlineLevels = 3;
options.OutlineOptions.ExpandedOutlineLevels = 1;

doc.Save(ArtifactsDir + "Rendering.SaveToPdfWithOutline.pdf", options);
See Also