How may I rename bookmarks with the section’s Bates number range?

Community Beginner ,
Jan 24, 2020 Jan 24, 2020

Copy link to clipboard

Copied

I've got an 8,000-page document with bookmarks. I'd like to rename the bookmarks with the Bates number range (or even just the Bates number of the bookmarked page), so I may then split the document into files named with the appropriate Bates number range. Been at this for several hours now, and can't seem to make more headway. I'm using Mac Catalina 10.15.2 and Acrobat Pro DC 2019. I'd sure appreciate someone's insight to get this done and off to the lawyers.

TOPICS
Acrobat SDK and JavaScript, How to

Views

161

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
community guidelines
Guest
Jan 25, 2020 Jan 25, 2020

Copy link to clipboard

Copied

Moving to the Acrobat forum from Community Help

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
community guidelines
Adobe Community Professional ,
Jan 25, 2020 Jan 25, 2020

Copy link to clipboard

Copied

Is each page Bates numbered? If so, what pattern did you use? This is not a simple task if you need to read the numbers off the pages. It's better to recreate the Bates numbering when editing the bookmarks directly. Either way, it will require a custom-made script to be developed.

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
community guidelines
Community Beginner ,
Jan 25, 2020 Jan 25, 2020

Copy link to clipboard

Copied

Yes, I used the Bates numbering stamp to number each page with a three-letter prefix and six-digit sequential number, from 000001 through 008152.

Using Python, I was able to rename each of the 300 files exported by bookmark to sequential file numbers (1 through 300), but I’d like to rename them instead by the Bates number of the first and last pages of each file.



Get Outlook for iOS

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
community guidelines
Adobe Community Professional ,
Jan 25, 2020 Jan 25, 2020

Copy link to clipboard

Copied

If you're interested I could develop for you a script that will do that, for a fee.

You can send me a sample file to [try6767 at gmail.com] so we could discuss it further.

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
community guidelines
Community Beginner ,
Jan 25, 2020 Jan 25, 2020

Copy link to clipboard

Copied

I appreciate that, try67. Unfortunately, I've given all the $ to the lawyers. Trying to learn how to fish here. 

In Python, I've figured out how to navigate to the directory and change each filname, but haven't sussed out how to extract the Bates number from the first page of each file. I'd be grateful for even a nudge in the right direction. 

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
community guidelines
Adobe Community Professional ,
Jan 25, 2020 Jan 25, 2020

Copy link to clipboard

Copied

Well, in Acrobat JavaScript there's a method called getPageNthWord that allows you to extract all the words in the file, one by one. If the Bates Number follows a specific (unique) pattern, or has a specific context with regarding to the rest of the text in the file, then you could use that method to locate it. There's also a method that returns the quads of each word, which is the location it takes on the page, and that can be used to identify text that's in a specific area, but that's much more complicated to use. I don't know if Python has similar methods, though.

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
community guidelines
Community Beginner ,
Jan 27, 2020 Jan 27, 2020

Copy link to clipboard

Copied

LATEST

Thanks very much, @try67. I will give these methods a shot and report back, in case anyone else is trying to accomplish the same thing. The Bates numbers are in the right-hand footer, so I think I'll try the quads approach first.

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
community guidelines