3 Replies Latest reply: Apr 10, 2012 4:14 AM by Muppet Mark RSS

    Export multiple ARTBOARDS to multiple JPGs (AppleScript)

    macbeth07

      I´m aware that Illustrator doesn´t have multiple artboards options for JPG as it does with eps, or other formats, but is there any workaround for this??

      Looping current artboard and exporting them to JPG or something. 

      Or maybe there is someway to force the   "save multiple artboards:true" in JPG??

       

       

      export document currentDoc to file exportFolder as JPEG with options ¬

                                                        {class:JPEG export options ¬

                                                                  , quality:100 ¬

                                                                  , artboard clipping:true ¬

                                                                  , artboard range:1 - 2 ¬

                                                                  , save multiple artboards:true}

        • 1. Re: Export multiple ARTBOARDS to multiple JPGs (AppleScript)
          Muppet Mark Community Member

          Looping current artboard and exporting them to JPG or something. Yep thats it… I don't AppleScript a great deal these days so get back if you do get stuck ( I'll need to do some dusting )

           

          The app lets you set the active artboard by index… So just count them and loop… You can't make a property that just ain't there…

          • 2. Re: Export multiple ARTBOARDS to multiple JPGs (AppleScript)
            macbeth07 Community Member

            Could not do it by pure AppleScript, I had to use Javascript like this:

             

            do javascript "app.activeDocument.artboards.setActiveArtboardIndex(0);"

                                                    set newFilePath to exportFolder & "Grafica-Estructura.jpg"

              export current document to newFilePath as JPEG with options ¬

                                                              {class:JPEG export options ¬

                                                                        , quality:100 ¬

                                                                        , artboard clipping:true}

                                                    do javascript "app.activeDocument.artboards.setActiveArtboardIndex(1);"

                                                    set newFilePath to exportFolder & "Grafica-Caracterizacion.jpg"

              export current document to newFilePath as JPEG with options ¬

                                                              {class:JPEG export options ¬

                                                                        , quality:100 ¬

                                                                        , artboard clipping:true}

            • 3. Re: Export multiple ARTBOARDS to multiple JPGs (AppleScript)
              Muppet Mark Community Member

              I've even posted that solution at MacScripter and forgotten all about the command being missing from AppleScript ( whats why I retain the muppet crown )…