Developer Tools
|
Office Productivity Applications
|
Enterprise Solutions
|
|||||||||||||||||||||||







Important
PDFOne .NET Bookmark has been discontinued. It was a function-based subset edition of PDFOne .NET. PDFOne .NET has more features and is our flagship .NET product.
Today, quite a lot of applications offer a PDF export option. PDF documents created in this manner can score higher in the usability scale if they were to have bookmarks.
In situations such as this, Gnostice PDFOne .NET Bookmark can help. Being a one-stop solution for PDF bookmark management, PDFOne .NET Bookmark covers everything from creating/deleting bookmarks to modifying/enhancing bookmarks.
Essentially, PDFOne .NET Bookmark can load a PDF document, parse its bookmark hierarchy and perform various kinds of bookmark-related tasks. Now, here is an example code snippet that does all this and more. Please follow my code comments closely.
// Creates a PDF document object PDFDocument doc = new PDFDocument(); // Loads an existing PDF document doc.Load("Bookmarks.pdf"); // Gets first bookmark in the above document PDFBookmark Bookmark1 = doc.GetFirstBookmark(); // Changes the color of the first bookmark Bookmark1.Color = Color.Red; // Gets the second bookmark in the document PDFBookmark Bookmark2 = Bookmark1.GetNext(); // Changes display style of the second bookmark // to bold text Bookmark2.Style = PDFBookmarkStyle.Bold;
In the above code snippet, we were able to get hold of the bookmark hierarchy by first calling PDFDocument.GetFirstBookmark() method, which returns a bookmark object referring to the first bookmark in the hierarchy.
Then, we could parse the bookmark hierarchy or tree by calling the PDFBookmark.GetNext() method. Lower down the tree, we could have called PDFBookmark.GetPrevious() to move up bookmarks in the hierarchy.
To parse bookmarks at different levels in the hierarchy, we have a PDFBookmark.GetFirstChild() method, as illustrated in the following code snippet.
// Gets first child bookmark PDFBookmark Bookmark1_Child1 = Bookmark1.GetFirstChild(); // Changes text used to display the child bookmark Bookmark1_Child1.Title = "Modified";
Sometimes, we need to bid adieu to some bookmarks. Here, we either go to the bookmark immediately below or immediately above the one we want to let go and delete the one we want to let go by calling PDFBookmark.RemovePrevious() or PDFBookmark.RemoveNext(), respectively.
// Gets next bookmark PDFBookmark Bookmark4 = Bookmark3.GetNext(); // Deletes previous bookmark Bookmark4.RemovePrevious(); // Bookmark3 is deleted
To jump to the parent node of a given bookmark and delete the first child node, you first go to the parent of the current bookmark and then delete the first child bookmark.
// Gets parent bookmark PDFBookmark Bookmark5_Parent = Bookmark5.GetParentNode(); // Deletes first child bookmark of the parent bookmark Bookmark5_Parent.RemoveFirstChild(); // Removes Bookmark5
Finally, PDFOne .NET Bookmark supports go-to, remote go-to, URI, JavaScript, launch, and named PDF actions.
// Adds a URI action to a bookmark Bookmark6.AddActionURI("www.gnostice.com");
You have learnt about the capabilities of PDFOne .NET Bookmark. Now, here is what we did in a sample PDF bookmark editor application we created using PDFOne .NET Bookmark.



Downloads:
---o0O0o---
| Our Developer Tools | |
|---|---|
eDocEngine VCLA Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools. |
PDFtoolkit VCLA Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents. |
XtremePDFConverter VCLA Delphi/C++Builder component to intelligently convert PDF to user-friendly Word RTF documents. |
|
PDFOne .NETA .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications. |
XtremeDocumentStudio .NETMulti-format document-processing component suite for .NET developers |
PDFOne (for Java™)A Java™ PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java™ applications. |
XtremeFontEngine (for Java)Java font engine to render glyphs from Type 1, Type 2 (CFF), and TrueType fonts |
| Our Office Productivity Applications |
|---|
Free PDF ReaderA free, fast, and portable application for viewing, printing and converting PDF documents. |
| Privacy | Legal | Feedback | Newsletter | Resellers | © 2002-2013 Gnostice Information Technologies Private Limited. All rights reserved. |
This site is best viewed on a screen with minimum resolution of 1152 x 864 pixels. Windows XP users are advised to use Microsoft ClearType Tuning for optimal experience. Also, please use the latest version of a standards-compliant browser such as Firefox, Opera, or Dragon (Chromium).