OutlineOptionsExpandedOutlineLevels Property |
Namespace: Aspose.Words.Saving
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.
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);