Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


VBA and Acrobat API (bookmarks and page labels for merged files!)

VBA and Acrobat API (bookmarks and page labels for merged files!)

VBA and Acrobat API (bookmarks and page labels for merged files!)

Hi all

I have some vba code which essentially merges together all PDF's in a directory using the Acrobat API, I am after some code to slot into my code to label the pages in the new PDF (like drawing number S-100/S-102 etc for example for each page), and to delete all the bookmarks and possibly/ideally enter new bookmarks equivalent to the page label. I've searched the internet and cannot seem to get a code snippet to modify to my needs that does either of these things. I admit I don't really understand exactly the way the API works but have fudged together some code so far through trial and error (mostly) with help from various internet sources to get me to this point but I am at a bit of a loss going further.

As the code stands all the bookmarks are inherited from the individual files, and the page labels are all being set to the same label as the first file and not to each individual file pages labels.

link to API if it helps Link
Can anyone head me in the right direction, post some example code which I can modify, etc!


RE: VBA and Acrobat API (bookmarks and page labels for merged files!)

I should add I have all of the page labels in excel if required, its also present as some metadata in the individual PDF's. Happy to use 3rd party command line based tools to achieve the end result (even the merging if it achieves the end result). Already using Exiftool to remove leftover metadata at end of process for example.

All PDF's are a single page if that matters (PDF drawings).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close