8 Replies Latest reply on Nov 28, 2016 8:11 AM by enviso

    Acrobat X -- Reorder Pages by Bookmark Sort Order

    Gray Strickland Level 1

      Is there a way to programatically / automatically re-order the pages of a PDF by sorting them according to bookmark order? I have 56 pages and each one has exactly one bookmark, which is numerical.

       

      I have a 56 page PDF that was made by scanning a "booklet." The original booklet was printed two logical pages to a single sheet of paper (left and right half of a landscape 8.5"x11" sheet), with two more logical pages on printed on the reverse side. All the sheets were saddle stitched (folded in half to make pages 5.5"x8" and stapled at the fold). After cropping out the right half pages to a new document, then cropping out the left half pages to a new document, then merging the two new documents, I have a new PDF whose true (original) pages are ordered 58, 56, 54... 6, 4, then 3, 5, 7... 55, 57. Each page is bookmarked with the original page numbers.

       

      If I could simply instruct Acrobat to re-order the pages by the bookmarks that appear on each page (exactly one bookmark per page), then my new PDF would be in the correct order to match the original paper booklet. Is there a way to do this?

        • 1. Re: Acrobat X -- Reorder Pages by Bookmark Sort Order
          Dave Merchant MVP & Adobe Community Professional

          Realistically, no. You can drag pages around in the sidebar to match the correct order but it can't be automated, not least because the JS API can't read the action of a bookmark so it has no idea which pages the bookmark is referring to.

          • 2. Re: Acrobat X -- Reorder Pages by Bookmark Sort Order
            Thom Parker Level 3

            Well actually, it can be automated and I have a tool that does exactly this operation at www.pdfscripting.com

             

            While a script can't read a bookmark action. It can execute a bookmark. As long as you are resonably sure the bookmark is a destination, then you're ok. The script runs each bookmark, building up a list of what goes where, and then orders the pages accordingly. My script takes into accound bookmarks that go no where, bookmarks that go to the same location, bookmark hiearchy, and pages that are not bookmarked.

             

             

            [[ REALLY excessive self promotion links removed by admin ]]

            • 3. Re: Acrobat X -- Reorder Pages by Bookmark Sort Order
              bernst@fastline.com Level 1

              Thom,

               

              You don't by any chance have a script that will put bookmarks into alphabetical order do you?

              • 4. Re: Acrobat X -- Reorder Pages by Bookmark Sort Order
                enviso Level 1

                Sorry to bring up an old thread, but there is a way to achieve this without any JavaScript programming, for anyone that's wondering.

                 

                You can export your Bookmarks as single PDFs, and then since all your PDFs are named by their respective page numbers, you can simply combine them into one PDF, and voilà.

                • 5. Re: Acrobat X -- Reorder Pages by Bookmark Sort Order
                  Bernd Alheit Adobe Community Professional & MVP

                  How did you export Bookmarks as single PDFs in Adobe Acrobat?

                  • 6. Re: Acrobat X -- Reorder Pages by Bookmark Sort Order
                    enviso Level 1

                    Easy. This is an Accessibility feature of the Acrobat Pro. You can automatically create bookmarks from a Structure. The Tags functionality enables you to create these Structures. 

                     

                    1. Assuming you have Acrobat Professional (i haven't tried this in Acrobat Reader), go to View > Show/Hide > Navigation Panes >Tags. The Tags pane will show up in the left sidebar. Click in the Options button in the Tags sidebar, and then click Add Tags to Document, like this:
                    tags.png

                     

                    This will create a structure you need. It basically tags all the (physically scanned) pages and creates a document tree. Now you have a logical structure.

                     

                    2. Now click above on the Bookmarks icon, and click on the Options button. Then click New Bookmarks from Structure, like this:

                    structure.png

                     

                    A dialog window will pop up, like this:

                    structure-elements.png

                    Click OK.Now you have created your Bookmarks (Figures). But the problem is, you can only export Top Level Bookmarks as single PDFs, and this procedure creates only one Top Level Bookmark, under which all other Bookmarks are nested. Not a problem.

                     

                    3. Simply expand the bookmark, and manually drag and drop all the nested bookmarks above this top-level bookmark, to make all of them top level, like this:

                    dragndrop.pngPlease note, for some reason, if you select all your bookmarks (Figures) and try to drag and drop them above the top level bookmark, Acrobat Pro only does it for the first two. After that, there is no problem, you can select all the rest, and drag and drop them above this top level bookmark. After you have done this, the top level bookmark doesn't point to anything, so you can safely delete it. Now you have top level bookmarks for all your existing pages.

                     

                    4. Now you have to rename them, one by one, for example Item_12, Item_46, Item_168, in whichever order you have scanned them.

                    This only takes a few minutes, even if you have hundreds of pages. After that you use the Split Document functionality, like this:

                    split-document.png

                    Here you can split the Document into multiple PDFs. Click on this button, and then this dialog will appear:

                    split-by-tlb.png

                    Select the Top-level bookmarks radio button. But also click on the Output Options button, and this dialog will appear:

                    use-boomark-names.png

                    Select Use bookmark names for file names, and click OK. If everything goes well, you have successfully created single PDFs for each of the individual bookmarks, and this dialog will appear:

                     

                    success.png

                     

                    That's it.  Now you can merge your nicely numbered individual PDFs into a single Binder. It is really that simple.

                     

                    Let me know if you need anything else.

                    1 person found this helpful
                    • 7. Re: Acrobat X -- Reorder Pages by Bookmark Sort Order
                      Bernd Alheit Adobe Community Professional & MVP

                      This works only for top-level bookmarks.

                      • 8. Re: Acrobat X -- Reorder Pages by Bookmark Sort Order
                        enviso Level 1

                        Clearly you haven't read my entire reply.