Click or drag to resize
BookmarkGetContent Method
Gets the content of the current Bookmark.

Namespace: GemBox.Document
Assembly: GemBox.Document (in GemBox.Document.dll) Version: 25.3.30.1231
Syntax
public ContentRange GetContent(
	bool includeBookmarkStartEnd
)

Parameters

includeBookmarkStartEnd
Type: SystemBoolean
if set to , returned ContentRange will also contain Bookmark.Start and Bookmark.End elements, otherwise it won't.

Return Value

Type: ContentRange
The content of the current Bookmark.
Remarks
Following table explains how includeBookmarkStartEnd parameter value affects on the behavior of methods of the returned ContentRange:
includeBookmarkStartEnd is includeBookmarkStartEnd is
ContentRange.Delete methodDeletes content between Bookmark.Start and Bookmark.End,
leaving the Bookmark.Start and Bookmark.End in the document.
Deletes content between Bookmark.Start and Bookmark.End,
removing the Bookmark.Start and Bookmark.End from the document,
thus removing the current Bookmark from the document (DocumentModel.Bookmarks collection).
ContentRange.LoadText and ContentRange.Set methodsSets new bookmarked content,
leaving the Bookmark.Start and Bookmark.End in the document.
Sets new bookmarked content,
removing the Bookmark.Start and Bookmark.End from the document,
thus removing the current Bookmark from the document (DocumentModel.Bookmarks collection).

For an example, see modify bookmarks sample.

See Also