BookmarksOutlineLevelCollection.Item
BookmarksOutlineLevelCollection Item property. Gets or a sets a bookmark outline level by the bookmark name.
BookmarksOutlineLevelCollection indexer (1 of 2)
Gets or a sets a bookmark outline level by the bookmark name.
public int this[string name] { get; set; }
Parameter | Description |
---|---|
name | Case-insensitive name of the bookmark. |
Return Value
The outline level of the bookmark. Valid range is 0 to 9.
Examples
Shows how to configure bookmarks outline levels.
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
// Configure exporting bookmarks in document header/footer
pdfSaveOptions.HeaderFooterBookmarksExportMode = HeaderFooterBookmarksExportMode.None;
// Set default bookmarks outline level
pdfSaveOptions.OutlineOptions.DefaultBookmarksOutlineLevel = 1;
// Specify concrete bookmark outline level.
pdfSaveOptions.OutlineOptions.BookmarksOutlineLevels.Add("bk3", 2);
pdfSaveOptions.OutlineOptions.BookmarksOutlineLevels.Add("bk4", 3);
// Remove bookmark
if (pdfSaveOptions.OutlineOptions.BookmarksOutlineLevels.Contains("bk3"))
pdfSaveOptions.OutlineOptions.BookmarksOutlineLevels.Remove("bk3");
// Clear all specified bookmark outline levels.
if (pdfSaveOptions.OutlineOptions.BookmarksOutlineLevels.Count > 0)
pdfSaveOptions.OutlineOptions.BookmarksOutlineLevels.Clear();
// Add bookmark back
pdfSaveOptions.OutlineOptions.BookmarksOutlineLevels["bk3"] = 2;
Converter.Create()
.From(MyDir + "Simple.docx")
.To(ArtifactsDir + "BookmarksOutlineLevel.pdf", pdfSaveOptions)
.Execute();
See Also
- class BookmarksOutlineLevelCollection
- namespace Wordize.Saving
- assembly Wordize
BookmarksOutlineLevelCollection indexer (2 of 2)
Gets or sets a bookmark outline level at the specified index.
public int this[int index] { get; set; }
Parameter | Description |
---|---|
index | Zero-based index of the bookmark. |
Return Value
The outline level of the bookmark. Valid range is 0 to 9.
See Also
- class BookmarksOutlineLevelCollection
- namespace Wordize.Saving
- assembly Wordize