OutlineOptions.ExpandedOutlineLevels

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

OutlineOptions.ExpandedOutlineLevels property

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

public int ExpandedOutlineLevels { get; set; }

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

Shows how to configure outlines in PDF.

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.OutlineOptions.HeadingsOutlineLevels = 3;
pdfSaveOptions.OutlineOptions.ExpandedOutlineLevels = 2;
pdfSaveOptions.OutlineOptions.CreateMissingOutlineLevels = true;
pdfSaveOptions.OutlineOptions.CreateOutlinesForHeadingsInTables = true;

Converter.Create()
    .From(MyDir + "TOC.docx")
    .To(ArtifactsDir + "PdfSaveOptions.OutlineOptions.pdf", pdfSaveOptions)
    .Execute();

See Also