Get PDF page names (labels) using vba

Community Beginner ,
Oct 20, 2017

Copy link to clipboard

Copied

Hello All,

I'm writing some vba code and I need to loop all the pages in a pdf file. I am able to get the name of the current page using  PDDoc.GetJSObject.GetPageLabel. I need to loop all the pages and get all their names. E.g.

For i = 0 to  PDDoc.getNumPages

     //code to read the page names

next i

Thank in advance,

Daniel.

It's me again. I figured it out. The .GetPageLabel accepts a parameter i.e. the loop counter i use to iterate the pages.

Thanks,

Daniel

TOPICS
Acrobat SDK and JavaScript, Windows

Views

407

Likes

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

Get PDF page names (labels) using vba

Community Beginner ,
Oct 20, 2017

Copy link to clipboard

Copied

Hello All,

I'm writing some vba code and I need to loop all the pages in a pdf file. I am able to get the name of the current page using  PDDoc.GetJSObject.GetPageLabel. I need to loop all the pages and get all their names. E.g.

For i = 0 to  PDDoc.getNumPages

     //code to read the page names

next i

Thank in advance,

Daniel.

It's me again. I figured it out. The .GetPageLabel accepts a parameter i.e. the loop counter i use to iterate the pages.

Thanks,

Daniel

TOPICS
Acrobat SDK and JavaScript, Windows

Views

408

Likes

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
Oct 20, 2017 0
Community Beginner ,
Oct 20, 2017

Copy link to clipboard

Copied

It's me again. I figured it out. The .GetPageLabel accepts a parameter i.e. the loop counter i use to iterate the pages.

Thanks,

Daniel

Likes

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
Reply
Loading...
Oct 20, 2017 0
Adobe Community Professional ,
Oct 20, 2017

Copy link to clipboard

Copied

I was just about to say the same thing when I saw your reply come in. Even though you are programming in VB or VBA, you need to read the JavaScript API documentation so that you know what functions take what parameters. The documentation for the function in question is here:

Acrobat DC SDK Documentation

Likes

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
Reply
Loading...
Oct 20, 2017 0