2 Replies Latest reply on Aug 19, 2017 7:39 AM by Wilson Faustino

    Resize Artboard based on Center Bottom

    Wilson Faustino



      I'd like to start a script to resize my artboard (in my case, just one for document) based on Center-Bottom reference point.


      Example: my file originally have 200x100mm and I want to change to 230x140mm without moving any content.


      reason: I work with a lot of label that change the page size only depending of which manufacturer. (I will build a database inside the script after).


      Any clue will be appreciated.

        • 1. Re: Resize Artboard based on Center Bottom
          Ten A Adobe Community Professional


          You can reference below article.


          However, previouse one based Top-Left position and you have to calculate and set to Bottom-Center.

          1 person found this helpful
          • 2. Re: Resize Artboard based on Center Bottom
            Wilson Faustino Level 1


            Thanks a lot for the article indication which was very helpful, but I found another article Re: Is it possible to resize all artboards at once the way you used to be able to do in document set-up? by CarlosCanto that brought me this:


            #target Illustrator  
            //  script.name = resizeArtboards_CS4andUp.jsx;  
            //  script.description = resizes all artboards;  
            //  script.requirement = one document with at least one artboard;  
            //  script.parent = carlos canto // 11/4/12;  
            //  script.elegant = false;  
            if (app.documents.length > 0) {  
                    //alert("more than 0");  
                                var idoc = app.activeDocument;  
                    var title = "Resize All Artboards";  
                    var width = Number(Window.prompt ("Enter New Artboard Width in points", 400, title));  
                    var height = Number(Window.prompt ("Enter New Artboard Height in points", 250, title));  
                for (i=0; i<idoc.artboards.length; i++) {  
                    var abBounds = idoc.artboards[i].artboardRect;// left, top, right, bottom  
                    var ableft = abBounds[0]; // 0  
                    var abtop = abBounds[1]; // 612  
                    var abwidth = abBounds[2] - ableft; // 792 // width  
                    var abheight = abtop- abBounds[3]; // 0 // height  
                    var abctrx = abwidth/2+ableft;  
                    var abctry = abtop-abheight;//edited from original  
                    var ableft = abctrx-width/2;   
                    var abtop = abctry+height;//edited from original  
                    var abright = abctrx+width/2;   
                    var abbottom = abBounds[3]; //edited from original 
                    idoc.artboards[i].artboardRect = [ableft, abtop, abright, abbottom];  
             else  {  
                    alert ("there are no open documents");  


            I hope it helps somebody else with the same question.