public IEnumerable <string> GetBookmarkNames(int id) { var undFormVersion = _context.UndFormVersion.Find(id); var getFilePath = undFormVersion.FileName.ToString(); //string newFileName = "EndrosementBlankPreview.pdf"; Document endorsement = new Document(getFilePath); DocumentBuilder builder = new DocumentBuilder(endorsement); BookmarkCollection bookmarks = endorsement.Range.Bookmarks; var bookmarkNames = bookmarks.Select(b => b.Name); return(bookmarkNames); }