Professional Web Applications Themes

Removing bookmarks in batch processing - Adobe Acrobat Windows

I'm attempting to remove the bookmarks from a number of doents using the "Execute JavaScript" batch processing function. However, there seems to be a rather large bug -- running the following lines in the console removes the bookmarks from the current doent and saves it to a new location. However, if you then open the doent again, THE BOOKMARKS ARE STILL THERE! this.bookmarkRoot.remove(); this.saveAs("/c/test/" + this.doentFileName); This happens in both 5 and 6; is there a workaround?...

  1. #1

    Default Removing bookmarks in batch processing

    I'm attempting to remove the bookmarks from a number of doents using the "Execute JavaScript" batch processing function. However, there seems to be a rather large bug -- running the following lines in the console removes the bookmarks from the current doent and saves it to a new location. However, if you then open the doent again, THE BOOKMARKS ARE STILL THERE!

    this.bookmarkRoot.remove();
    this.saveAs("/c/test/" + this.doentFileName);

    This happens in both 5 and 6; is there a workaround?
    Mat_Hall@adobeforums.com Guest

  2. #2

    Default Re: Removing bookmarks in batch processing

    Seems to me that I had something similar happen, but I can't remember how or
    even if I figured out why.

    Instead of using the console, I add my code to a batch sequence and run it
    on the open file or on a folder of PDF files. I only remove a specific
    number of bookmarks rather than all the bookmarks, but maybe there's
    something in my code that could help you figure out what's wrong.


    ========================
    function DocLibraryBookmark(bm, nLevel)
    {
    // !!!!! Change 3: Add Conditional Options under this line
    var s = "";
    for (var i = 0; i < nLevel; i++)
    s += " ";

    // !!!!! Change 1: This line here with other options.
    bookmarkRoot.children[0].remove();
    }

    // Start the Program
    // !!!!! Change 2: this.bookmarkRoot to alternative
    DocLibraryBookmark(this.bookmarkRoot.children[0], 0);


    function ProductBookmark(bm, nLevel)
    {
    // !!!!! Change 3: Add Conditional Options under this line
    var s = "";
    for (var i = 0; i < nLevel; i++)
    s += " ";

    // !!!!! Change 1: This line here with other options.
    bookmarkRoot.children[0].remove();
    }

    // Start the Program
    // !!!!! Change 2: this.bookmarkRoot to alternative
    ProductBookmark(this.bookmarkRoot.children[0], 0);



    function AbbreviationsBookmark(bm, nLevel)
    {
    // !!!!! Change 3: Add Conditional Options under this line
    var s = "";
    for (var i = 0; i < nLevel; i++)
    s += " ";

    // !!!!! Change 1: This line here with other options.
    bookmarkRoot.children[0].remove();
    }

    // Start the Program
    // !!!!! Change 2: this.bookmarkRoot to alternative
    AbbreviationsBookmark(this.bookmarkRoot.children[0], 0);
    ========================

    Rick


    Rick Henkel Guest

  3. #3

    Default Re: Removing bookmarks in batch processing

    Just to clarify, I was attempting to do it in a batch, but nothing seemed to be happening. Doing it via the console let me see what was going wrong...
    Mat_Hall@adobeforums.com Guest

Similar Threads

  1. Unattended batch processing
    By Gregory_Mouning@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: September 12th, 04:58 AM
  2. Batch Processing, not quite batch
    By Ken_Blesse@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 2
    Last Post: May 19th, 02:03 PM
  3. Batch processing in Illustrator 10
    By jdupre@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 0
    Last Post: April 29th, 10:48 PM
  4. batch processing
    By Thee_DarkOverLord in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 10
    Last Post: September 23rd, 07:15 PM
  5. Batch Processing not available???
    By mh330 webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 3
    Last Post: July 21st, 03:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139