3 Replies Latest reply on Oct 26, 2015 2:53 PM by try67

    script to split pdf based on bookmarks in acrobat dc

    gert verrept Level 2

      Hi,

      I'm looking for a script (or action) to split a pdf in several pdfs, based on the bookmarks, and with the split name equal to the bookmark name.

      ex. Bookmark = nr am 43 (this is in fact the para style used in the indesign file), so the file should by named: nr am 43.pdf.

        • 1. Re: script to split pdf based on bookmarks in acrobat dc
          try67 MVP & Adobe Community Professional

          Some information missing here:

          - Do you want to do this to all bookmarks, or just some (say, only the top-level ones)?

          - Which page(s) should be included in the newly split file? The page the bookmark is pointing to? All of the pages until the next bookmark? Something else?

          - Which folder should be used for the new files? The same as the original one?

          - What should happen if the bookmark name can't be used as a file-name (if it contains illegal characters, for example, or is a duplicate of another file)?

          • 2. Re: script to split pdf based on bookmarks in acrobat dc
            gert verrept Level 2

            @try67:

            Sorry about the lack of info, I was still looking for a solution on other sites, so:

            a. only top level one

            b. until next bookmark

            c. the same as the original one

            d. Not possible, the names are unique since they contain a sequence number and one or more names.

             

            To clarify point d: The doc name is 1234002. In this doc, a para style is used, called AM_NL which is used every time we encounter a sentence starting with "Nr. (followed by a sequence number) van de heer XXXX (or van de heren XXXX en YYYY...)". In doc 1234002 this number can appear only ones.

            • 3. Re: script to split pdf based on bookmarks in acrobat dc
              try67 MVP & Adobe Community Professional

              This kind of code was posted to these forums many times in the past.

              Basically you need to use a loop to iterate over the bookmarks, executing

              each one and then using the current page number information to determine

              the page range for each bookmark, and then extract it as a new file.

              In the past this process didn't work as a part of an Action, but I believe

              that was fixed recently.

               

              On Mon, Oct 26, 2015 at 2:15 PM, gert verrept <forums_noreply@adobe.com>