SplitOnBookmarks
function can be used to split a document into chapters, sections etc according to the tree structure of its bookmarks. The level
argument gives the level of the tree upon which to split. Level 0 indictates just top-level bookmarks, level 1 top-level and next-level-down etc.