Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Status
Not open for further replies.

Agent666

Structural
Jul 2, 2008
3,080
0
0
NZ
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!

Thanks
 
 http://files.engineering.com/getfile.aspx?folder=ef5422db-9fa4-4eb8-a185-5f4b5708ca89&file=Document1.pdf
Replies continue below

Recommended for you

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).


 
Status
Not open for further replies.
Back
Top