Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Developers


Topic: Add bookmark at the first position in bookmark list
Conf: (P-PDF) Developers, Msg: 85834
From: shahzad19_00
Date: 4/9/2003 08:18 PM

Dear All,

I am working on adobe acrobat plugin development. My work is related to adding new bookmark at the first position in the bookmark list. If there is no bookmark present in the pane then it works ok. The problem arises when we already have some bookmarks in the bookmark pane?

I follow two strategies to cope with this situation but still need help as they are not working 100% fine,

- I just get the reference of the first bookmark by PDBookmarkGetFirstChild(Root) and get the reference of newly added bookmark. Now Unlink the reference of new bookmark and place is as PDBookmarkAddPrev(firstChild).

PDBookmark newBookmark = PDBookmarkAddNewChild (Root, "Untitled");
PDBookmarkUnlink (newBookmark);

PDBookmark firstChild = PDBookmarkGetFirstChild(Root);
PDBookmarkAddPrev(firstChild, newBookmark);

In this case, the result is little different. After doing this operation the bookmark won't appear. If I save the file and reopen it again then every thing is fine and bookmark, that I added at the first position, is present at the first position. In this case, what I think, the problem is more related to refreshing of bookmark pane (list). Any Comments ?

- Following the same steps in first strategy except adding at previous position, I add at the next position of the first bookmark. Adding bookmark at the next position shows up immediately. I tries to swap the contents of the first two bookmarks. Everything works fine in this case. The only problem occurs is that when we have two titles of different length ( "Abc" and "efghijkl" ). Upon swapping the contents, bookmark actions swapped successfully but the bookmark at the first place become "efg", which should be "efghijkl" and bookmark at second place become "Abc" which is correct. The title that is smaller won't get effected but the title of larger length got truncated upto the length of smaller title. Any comments ??


Waiting for your reply,

Best Regards,

Shozi


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.