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.
Copy link to clipboard
Copied
Moving to the Acrobat forum from Community Help
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.
Copy link to clipboard
Copied
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.
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.
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.
Copy link to clipboard
Copied
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.