Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
0

Removing "/" from the middle of multiple bookmarks?

New Here ,
Mar 02, 2016 Mar 02, 2016

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

TOPICS
Acrobat SDK and JavaScript , Windows
679
Translate
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

correct answers 1 Correct answer

LEGEND , Mar 02, 2016 Mar 02, 2016

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

Translate
LEGEND ,
Mar 02, 2016 Mar 02, 2016

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

Translate
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
New Here ,
Mar 03, 2016 Mar 03, 2016
LATEST

Fantastic George, thanks for your help it works a treat. Just started using Acrobat this week and was in need of much needed support.

Translate
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