Rank: Guest
Groups: Guests
Joined: 1/5/2016(UTC) Posts: 154
Was thanked: 4 time(s) in 4 post(s)
|
Hi there First of all thanks very much for your great help
I need to delete a selected bookmark item from pdf file But seems I can not do it through PdfBookmarkCollections When I call DeleteAt the system raise a exception
Let me know if there are any ways that I can use to delete a specified bookmark itme
Thanks in advance
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 961
Thanks: 3 times Was thanked: 115 time(s) in 112 post(s)
|
What kind of exception is thrown?
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 10/15/2020(UTC) Posts: 8 
|
Originally Posted by: Paul Rayman  What kind of exception is thrown? keyword is no in the dictionary
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 10/15/2020(UTC) Posts: 8 
|
GFCCGong Lian Bai Pi Shu 9-15(2)(2)(2).pdf (780kb) downloaded 8 time(s).Hi, this is the file I have problem with Code: void deleteBookmark(PdfBookmarkCollections bookmarks, PdfBookmark toBeDeleted)
{
if (bookmarks == null || bookmarks.Count < 1 || toBeDeleted == null)
{
return;
}
if (bookmarks.Contains(toBeDeleted))
{
int idx = bookmarks.IndexOf(toBeDeleted);
bookmarks.ToList().Remove(toBeDeleted);
try
{
bookmarks.DeleteAt(idx);
}catch (Exception ex)
{
MessageUtil.Alter("删除书签失败:" + ex.Message);
}
}
foreach (PdfBookmark b in bookmarks)
{
deleteBookmark(b.Childs, toBeDeleted);
}
}
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 961
Thanks: 3 times Was thanked: 115 time(s) in 112 post(s)
|
|
|
|
|
Forum Jump
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close