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

  • Have a look here – Cai Dec 31 '15 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 Dec 31 '15 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 Dec 31 '15 at 12:46
  • Ok fair enough, I think scripting may be your only option. I can't find anything though. – Cai Dec 31 '15 at 12:51
  • 1
    Oh ok @hsawires, I misunderstood your comment. You are right. – Cai Dec 31 '15 at 12:58
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();
  • 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 Jan 2 '16 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 – Carlos Canto Jan 3 '16 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 Jan 3 '16 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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