Copy link to clipboard
Copied
Hi,
Needing some help/action to remove the "/" which is in the middle of multiple bookmarks i.e.. "123456789012/ 12345".
Ideally look to save as "123456789012-12345" so the file can be split into individual pages named as the bookmarks 123456789012-12345.pdf
Using Acrobat X Pro.
Thanks,
Kenny
You can run the following script in the interactive JavaScript console (Ctrl+J) or place it in the Mouse Up event of a temporary button and click it to execute the code.
function updateBookmarkName(bkm, nLevel) | { |
// Replace the "/ " character combination with "-"
bkm.name = bkm.name.replace(/\/ /g, "-");
if (bkm.children) {
for (var i = 0; i < bkm.children.length; i += 1) {
updateBookmarkName(bkm.children, nLevel + 1);
}
}
}
updateBookmarkName(bookmarkRoot, 0);
Copy link to clipboard
Copied
You can run the following script in the interactive JavaScript console (Ctrl+J) or place it in the Mouse Up event of a temporary button and click it to execute the code.
function updateBookmarkName(bkm, nLevel) | { |
// Replace the "/ " character combination with "-"
bkm.name = bkm.name.replace(/\/ /g, "-");
if (bkm.children) {
for (var i = 0; i < bkm.children.length; i += 1) {
updateBookmarkName(bkm.children, nLevel + 1);
}
}
}
updateBookmarkName(bookmarkRoot, 0);
Copy link to clipboard
Copied
Fantastic George, thanks for your help it works a treat. Just started using Acrobat this week and was in need of much needed support.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now