Batch renaming layers in several pdfs?
I have 100+ (geo-referenced) pdfs, in which I need to rename some of the layers. E.g. "If the pdf contains a layer named abc, it should be renamed to def, if it contains a layer a23, it should be renamed to c47, etc.". So I have a list of the names I want to replace, and I need to do that across all pdfs (some of the layers are inside groups or nested groups). And I'm looking for a way to automate/script this.
I'm not very familiar with the Adobe products, so I'm not even sure where to start. I can see that Acrobat can do the renaming, and also preserves the geo-referencing info in the pdf when saved, but it doesn't seem very scriptable from what I can find (it seems to mostly be about adding javascript to the pdf, not executing it across multiple pdfs). Illustrator seems more scriptable, but if I open a pdf in Illustrator, it doesn't show the layer names that I'm looking for, so it seems to have a different view of what a layer is.
I'm happy to code in javascript, bat or whatever is relevant. Any input is appreciated.
