logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

New Topic Post Reply
Options
Go to last post Go to first unread
Guest  
#1 Posted : Thursday, October 29, 2020 5:48:44 AM(UTC)
Quote
Guest

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
Paul Rayman  
#2 Posted : Thursday, October 29, 2020 8:10:15 AM(UTC)
Quote
Paul Rayman

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?
lugangxyz  
#3 Posted : Thursday, October 29, 2020 9:26:13 AM(UTC)
Quote
lugangxyz

Rank: Newbie

Groups: Registered
Joined: 10/15/2020(UTC)
Posts: 8
China

Originally Posted by: Paul Rayman Go to Quoted Post
What kind of exception is thrown?


keyword is no in the dictionary
lugangxyz  
#4 Posted : Thursday, October 29, 2020 7:42:15 PM(UTC)
Quote
lugangxyz

Rank: Newbie

Groups: Registered
Joined: 10/15/2020(UTC)
Posts: 8
China

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);
			}
		}
Paul Rayman  
#5 Posted : Tuesday, November 3, 2020 2:36:33 AM(UTC)
Quote
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 961

Thanks: 3 times
Was thanked: 115 time(s) in 112 post(s)
No exceptions are thrown with the code you provided.
Please contact support and provide a more specific code to reproduce the problem.
https://pdfium.patagames.com/Support/
Quick Reply Show Quick Reply
Users browsing this topic
New Topic Post Reply
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.