SharpLeaf Reference > SharpLeaf Methods > SetBookmark Method

SharpLeaf.SetBookmark Method

Create a bookmark entry for upcoming element (paragraph, inclusion, etc.).

Overloads

Example

  // Set up a level-3 bookmark that is not opened by default in the PDF viewer
   bkmk357 = "3.5.7 - Pre-conclusions #14";
   lf.SetBookmark(bkmk357,3,false);
   lf.AddParagraphs("Research suggests that deep report structures may have soporific "+
            "effects on readers.");
  // [...]
   lf.AddText("As seen earlier ");
   lf.AddBookmarkReference(bkmk357,"(cf. p.{page} - {title})");  // will be clickable in PDF only

Description

The page number of any bookmark (even upcoming ones) can be printed with AddBookmarkReference.

Bookmarks can automatically be generated for paragraphs with ParagraphStyle.BookmarkLevel.

Only the PDF format supports bookmark browsing at view time (which can be forced with PdfMode.ShowOutlines).

See also ...

SharpLeaf Members | SharpLeaf.AddBookmarkReference Method | ParagraphStyle.BookmarkLevel Property


Send comments on this topic
© Dyalog Ltd 2016