View Single Post
What you will need:
Copy of Omnigraffle 5.2
Copy of Acrobat Pro
Script for generating the canvas names
Script for generating the corresponding canvas numbers

NOTE: I broke the TOC out into two scripts because I wanted to format my TOC on an Omnigraffle Canvas instead of the kinda ugly thing that Acrobat gives you. I also wanted to be able to take out items such as the Title page from the TOC. I have provided the single script solution if you just want quick and dirty with no formatting / editing ability.


NOTE: I am not an Acrobat guy in an sense so there's probably a better way to automate this. Would love to hear it.

Ok, let's do this:

Part I

Step 1: Export your graffle file as a PDF vector image. In the 'Export area' dropdown, make sure you select 'Entire Document'

Step 2: Open up your new pdf file in Acrobat Pro

Step 3: In Acrobat Pro go to Advanced > Document Processing > Batch processing

Step 4: Select 'New sequence' and name it TOC_NAMES

Step 5: In the Edit dialog, click the 'Select Commands button and choose 'Execute Javascript' and add it to the right column using the Add button

Step 6: Once the 'Execute Javascript' has been added to the right column, Click it to open it. There should be a 'script:' label.

Step 7. Double click on the 'script:' label and it will launch a text window. Copy and paste the toc_names script that I have attach. (you can open the script in TextEdit).

For the '2. Run commands on' dropdown choose 'Files open in Acrobat'

Step 8. Close out of the Edit Sequence dialog. You now have a TOC_NAMES in your batch sequences. Select it and click 'Run Sequence"

Step 9. You will get a 'Run Sequence Confirmation' dialog box. Click the arrow next to the 'Execute Javascript label and then select the script. Click OK. It will then show you the Javascript Editor window - click ok.

Step 10. After clicking ok on the Confirmation and the Javascript editor windows, Acrobat will dynamically generate a PDF with a list of you canvasses. You can copy and paste this list into a new Omnigraffle Table of Contents canvas.


Part II

To get the corresponding page numbers, repeat steps 3 - 10 but creating a TOC_NUMBERS sequence and using the toc_numbers script instead.

Acrobat will then auto generate a list of your page numbers in your doc. You can copy and paste that column into your Table of contents canvas.

So now you have the list of Canvas names in one column and their corresponding page numbers in another. You just need to make sure they line up. You can also edit the columns so that you take out the Title page etc.

Final

So now you should have 2 batch sequences saved in your Acrobat Pro that you can use repeatedly to generate TOCs for your Omnigraffle files. It's definitely a work around but it's hours better than doing and changing a TOC by hand.
Attached Files
File Type: txt toc_names.txt (1.6 KB, 418 views)
File Type: txt toc_numbers.txt (1.7 KB, 399 views)
File Type: txt toc_both.txt (1.7 KB, 464 views)