• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

I need get Adobe acrobat Bookmarks levels, Level by level value using c++/Vc++/win32

Explorer ,
Nov 21, 2021 Nov 21, 2021

Copy link to clipboard

Copied

I'm doing iterating all bookmarks in adobe acrobat. So here i want know level by level means: To get all first levels,To get all second levels amd To get third levels. Please give some advise on that.

 

I need to get higest level of bookmark value.

TOPICS
How to

Views

801

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2021 Nov 22, 2021

Copy link to clipboard

Copied

I don't know how it works in those languages, but with JavaScript you start with the bookmark root object and access its children array. Those are the top-level bookmarks. Then each one of those can have its own children array, which are the second-level bookmarks, etc., etc.

If you want to iterate over all of the bookmarks you will need to use a recursive function, where you can keep track of the level using an integer variable that you pass to it as a parameter with an initial value of zero, and increment it by one each time you go down into a new recursion level.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 23, 2021 Nov 23, 2021

Copy link to clipboard

Copied

Can you please explain clearly. level by level bookmarks.

 

I'm getting all levels at a time recursive function. I need level wise.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 23, 2021 Nov 23, 2021

Copy link to clipboard

Copied

Then you need to code differently. For example, iterate levels twice, the first time breadwise and the second time depthwise. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 23, 2021 Nov 23, 2021

Copy link to clipboard

Copied

I think need to go through datastructues is it right?  To find out the levels.

 

can i use this way implementation:


vector <int> v[10] ; //Vector for maintaining adjacency list explained above
int level[10]; //To determine the level of each node
bool vis[10]; //Mark the node if visited
void bfs(int s) {
queue <int> q;
q.push(s);
level[ s ] = 0 ; //Setting the level of the source node as 0
vis[ s ] = true;
while(!q.empty())
{
int p = q.front();
q.pop();
for(int i = 0;i < v[ p ].size() ; i++)
{
if(vis[ v[ p ][ i ] ] == false)
{
//Setting the level of each node with an increment in the level of parent node
level[ v[ p ][ i ] ] = level[ p ]+1;
q.push(v[ p ][ i ]);
vis[ v[ p ][ i ] ] = true;
}
}
}
}

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 24, 2021 Nov 24, 2021

Copy link to clipboard

Copied

can you please guide

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 24, 2021 Nov 24, 2021

Copy link to clipboard

Copied

It seems your question isn't really about the API (you understand it correctly) but how to create an algorithm given the API. This is probably not the best forum for you. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 24, 2021 Nov 24, 2021

Copy link to clipboard

Copied

It is completely through working API's, Adobe acrobat Plugin developement using Vc++

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 25, 2021 Nov 25, 2021

Copy link to clipboard

Copied

It looks as if nobody here has the time to help. This is a complex algorithm, and you need to develop it yourself.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 25, 2021 Nov 25, 2021

Copy link to clipboard

Copied

can you please explain flow of  algorthim.

 

Actually agend: get the Bookmark Levels need to be display in combobox

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 25, 2021 Nov 25, 2021

Copy link to clipboard

Copied

LATEST

We've explained how it should work. If you want someone to write this (non-trivial) code for you you'll probably need to hire them to do so.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 24, 2021 Nov 24, 2021

Copy link to clipboard

Copied

Use a recursive function for this. When a bookmark has childrens call the function also for the childrens.

There is a sample in the Acrobat Javascript Reference.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines