OutlineOptionsHeadingsOutlineLevels Property

Specifies how many levels of headings (paragraphs formatted with the Heading styles) to include in the document outline.

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

Property Value

Type: Int32
Remarks

Specify 0 for no headings in the outline; specify 1 for one level of headings in the outline 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