0

Is there a way to reverse the order of artboards so that pages 1 2 3 4 become 4 3 2 1 ? I am trying to extract the English pages from a bilingual booklet and changing each artboard manually is not the most efficient.

(Looking for automation solution)

Thanks in advance

7
  • Have a look here
    – Cai
    Commented Dec 31, 2015 at 12:26
  • @Cai Thanks but not quite what I'm looking for, it works good for repositioning a single artboard, I want to reverse all at once.
    – Aziz
    Commented Dec 31, 2015 at 12:30
  • 1
    why don't you save your AI file as PDF and open it with Acrobat and revers the order of the pages ? because Illustrator doesn't preserve an order to your artboard as it cloud be freely re positioned.
    – hsawires
    Commented Dec 31, 2015 at 12:46
  • Ok fair enough, I think scripting may be your only option. I can't find anything though.
    – Cai
    Commented Dec 31, 2015 at 12:51
  • 1
    Oh ok @hsawires, I misunderstood your comment. You are right.
    – Cai
    Commented Dec 31, 2015 at 12:58

1 Answer 1

2

use this script,

// reverseArtboardsOrder.jsx
// carlos canto
// http://graphicdesign.stackexchange.com/questions/64865/is-there-a-way-to-automate-reversing-the-order-of-artboards-in-illustrator

function reverseArboardsOrder () {
    var idoc = app.activeDocument;
    var abs = idoc.artboards;
    var abcount = abs.length; 

    var abNames = [];    
    var abRects = [];

    for (i=0; i<abcount; i++) {
        abNames[i] = abs[i].name; 
        abRects[i] = abs[i].artboardRect;
    }

    for (j=0, k=abcount-1; j<abcount; j++, k--) {
        var abRect = abRects[k]; 
        idoc.artboards.remove(k); 
        var newab = idoc.artboards.add(abRect);
        newab.name = abNames[k]; 
    }
    idoc.rearrangeArtboards();
}

reverseArboardsOrder();
3
  • If you don't want to visually reorder the artboards (I don't think that's what the question is asking for) just reverse the order in the artboards panel, remove the call to rearrangeArtboards()
    – Cai
    Commented Jan 2, 2016 at 23:38
  • Hi Cai, I thought the OP wanted to reverse the visual order as well, since he wasn't happy with the result of the first script you linked in your first comment Commented Jan 3, 2016 at 2:34
  • Thanks Carlos! The script works beautifully, and yes although it was not clear, rearranging the visual order as well is logical. Much appreciated and a happy new year :)
    – Aziz
    Commented Jan 3, 2016 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.