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

Notification

Icon
Error

Post a reply
From:
Message:

Maximum number of characters in each post is: 32767
Bold Italic Underline   Highlight Quote Choose Language for Syntax Highlighting Insert Image Insert an existing Attachment or upload a new File... Create Link   Unordered List Ordered List   Left Justify Center Justify Right Justify   Outdent Indent   More BBCode Tags
Font Color Font Size
Security Image:
Enter The Letters From The Security Image:
  Preview Post Cancel

Last 10 Posts (In reverse order)
Paul Rayman Posted: Friday, June 14, 2019 1:42:50 AM(UTC)
 
BookmarksViewer code on WinForms is very simple. There are literally a few lines of code. Therefore, you can easily implement it in the WPF yourself, using any standard control suitable for your application. Source code can be found here: https://github.com/Patag...aster/BookmarksViewer.cs
claudiu Posted: Thursday, June 6, 2019 5:08:34 PM(UTC)
 
Hi there,

could you point me to an example on how to implement a bookmark viewer in WPF.

Cheers!
Guest Posted: Monday, April 25, 2016 2:10:17 AM(UTC)
 
there is a way to do the same thing with wpf pdfviewer?
Guest Posted: Wednesday, April 13, 2016 3:50:03 AM(UTC)
 
OMG it works :D? THANKS
Paul Rayman Posted: Wednesday, April 13, 2016 3:30:37 AM(UTC)
 
if you are using bookmark viewer provided by sdk then you need the following only

Code:

pdfViewer1.BookmarksViewer = bookmarksViewer1


PdfViewer implements the scroll to page on click on a bookmark functionality by default.
Guest Posted: Wednesday, April 13, 2016 2:14:08 AM(UTC)
 
var node = e.Node as BookmarksViewerNode;

it seems to be not possible, visual studio says it's not possible because its level protection "bookmarksviewermode"
Paul Rayman Posted: Friday, April 8, 2016 7:32:37 AM(UTC)
 
Code:

_bookmarksViewer.AfterSelect += _bookmarksViewer_AfterSelect;


Code:

private void _bookmarksViewer_AfterSelect(object sender, TreeViewEventArgs e)
{
	var node = e.Node as BookmarksViewerNode;
	if (node == null || node.Bookmark == null)
		return;

	if (node.Bookmark.Action != null)
		ProcessAction(node.Bookmark.Action);
	else if (node.Bookmark.Destination != null)
		ProcessDestination(node.Bookmark.Destination);
}


BTW, you can do the following:
Code:

pdfViewer1.BookmarksViewer = bookmarksViewer1

that's all
Guest Posted: Friday, April 8, 2016 4:35:54 AM(UTC)
 
thanks and how can i get the action from the bookmarkviewer (node clicked on the treeview) ?
Paul Rayman Posted: Thursday, April 7, 2016 4:21:01 AM(UTC)
 
Please look at bookmark's Action and Destination properties here: https://pdfium.patagames.com/help/html/39813c60-72f9-1565-4e1f-0de959822d66.htm

The destination contain the PageIndex property, so you may call PdfViewer.ScrollToPage(destination.PageIndex).

Code:

if (Bookmark.Action != null)
	ProcessAction(Bookmark.Action);
else if (Bookmark.Destination != null)
	ProcessDestination(Bookmark.Destination);

Code:

private void ProcessAction(PdfAction pdfAction)
{
	if (pdfAction.ActionType == ActionTypes.Uri)
		Process.Start(pdfAction.ActionUrl);
	else if (pdfAction.Destination != null)
		ProcessDestination(pdfAction.Destination);
}

Code:

private void ProcessDestination(PdfDestination pdfDestination)
{
	ScrollToPage(pdfDestination.PageIndex);
	Invalidate();
}
Guest Posted: Thursday, April 7, 2016 2:04:41 AM(UTC)
 
hi,

Is there a way when i click on a bookmark in my list of bookmarks to display the page who correspond (in a pdf who contains multiple pages) ?

thank you