private void LoadBookmarks(PdfBookmarkCollection bookmarks, IntPtr bookmark) { if (bookmark == IntPtr.Zero) { return; } bookmarks.Add(LoadBookmark(bookmark)); while ((bookmark = NativePdfiumMethods.FPDF_BookmarkGetNextSibling(_document, bookmark)) != IntPtr.Zero) { bookmarks.Add(LoadBookmark(bookmark)); } }
private void LoadBookmarks(PdfBookmarkCollection bookmarks, IntPtr bookmark) { if (bookmark == IntPtr.Zero) { return; } bookmarks.Add(LoadBookmark(bookmark)); while ((bookmark = PdfiumLibrary.FPDFBookmark_GetNextSibling(_document, bookmark)) != IntPtr.Zero) { bookmarks.Add(LoadBookmark(bookmark)); } }
private PdfBookmarkCollection LoadBookmarks(IntPtr bookmark) { var result = new PdfBookmarkCollection(); if (bookmark == IntPtr.Zero) { return(result); } result.Add(LoadBookmark(bookmark)); while ((bookmark = NativeMethods.FPDF_BookmarkGetNextSibling(_document, bookmark)) != IntPtr.Zero) { result.Add(LoadBookmark(bookmark)); } return(result); }
private void TranslateBookmarks(PdfBookmarkCollection result, PdfBookmarkCollection bookmarks) { foreach (var bookmark in bookmarks) { if (bookmark.PageIndex >= _startPage && bookmark.PageIndex <= _endPage) { var resultBookmark = new PdfBookmark { PageIndex = bookmark.PageIndex - _startPage, Title = bookmark.Title }; TranslateBookmarks(resultBookmark.Children, bookmark.Children); result.Add(resultBookmark); } } }
private void LoadBookmarks(PdfBookmarkCollection bookmarks, IntPtr bookmark) { if (bookmark == IntPtr.Zero) return; bookmarks.Add(LoadBookmark(bookmark)); while ((bookmark = NativeMethods.FPDF_BookmarkGetNextSibling(_document, bookmark)) != IntPtr.Zero) bookmarks.Add(LoadBookmark(bookmark)); }