Over the last year or so, I’ve cobbled together a couple Illustrator scripts that export multiple artboards in an Illustrator document as PNG files, and export multiple layers as PNG files. (See my previous blog posts here and here.) I’d been meaning to merge them into one script, but had never quite gotten around to it until Khoi tweeted that he was looking for a script that did just that, but to PDF format.
So, a couple train rides later, I’ve finally combined the two scripts into a single one with a couple more added features: you can choose to export as PDFs in addition to PNGs, and you can also export the product of artboards and layers.

To use the script, download MultiExporter.jsx and put in your Illustrator scripts folder (usually in Applications/Adobe Illustrator/Presets/Scripts/). Restart Illustrator, and run the script by going to “File > Scripts > MultiExporter”.
A few notes:
- You can choose whether you want to export all the artboards in the document with the currently visible layers showing, or if you want to export files for each of the layers in a document on the currently active artboard, or if you want to export a combination of all the artboards multiplied by all the layers.
- Files are named based on their layer name. It only exports layers where their name has been changed from the default “Layer 1″, “Layer 2″ or “Artboard 1”, “Artboard 2”, etc.
- If you put a minus sign (-) in front of a layer name or artboard name, it will skip that layer or artboard. (Useful for when you no longer decide you like a particular mockup, but don’t want to delete it from the master Illustrator document.)
- For layers only: If you put a plus sign (+) in front of a layer name, that layer will always be visible. Useful for if you want to have a layer that always appears in the background of each exported image.
- It stores its settings in a nonvisible, nonprinting layer named “nyt_exporter_info”
- It has an option for transparency, and lets you choose between PNG8, PNG24 and PDF.
You can try it out on the sample file artboard-layer-test.ai.
![]()
The sample file contains artwork for buttons on three artboards — “Red”, “Blue” and “-Green” — and has seven layers.

- If you run the script and choose “Export Artboards (with currently visible layers)” it will generate two files: Red.png and Blue.png that include whatever layers are currently showing at the time you run the script. (It skips the “-Green” artboard because the artboard name begins with a minus sign.
- If you chose “Export Layers (on currently selected artboard)” it will generate two files: Play.png and Pause.png. The “+Button” and “+Gradient” layers will appear in the background of both exported files, and it will skip the “-Pause 2″ and “Layer 5″ layers.
- And if you choose the “Artboard + Layers”, it will do a combination of the two other options and generate four files: Red-Play.png, Red-Pause.png, Blue-Play.png and Blue-Pause.png.
Try it out, and leave a note in the comments if you have any problems or suggestions.
THANK YOU SO, SO VERY MUCH!!!
I had ton of files with a 1000 names, no kidding, in multiple layers.
You saved me literally DAYS of deleting layers and exporting individually.
THANK YOU, THANK YOU, THANK YOU!!!!!!!!!!!!!!!!!
hello eric.
great script. wondering if there is the possibility/ability of exporting to individual .ai files.
apologies, i called you eric, matthew!
Thank you so much for this, it’s absolutely fantastic and should be part of illustrator
How do I download the script? It just takes me to a webpage when I click on it.
Amazing! Saves so much time thank you 🙂
Hey, this worked perfectly and it was exactly what I wanted. It has functionality above and beyond what I thought I needed. You have foreseen an opportunity and taken full advantage in order to meet and surpass many unexpected expectations. THANK YOU VERY MUCH!
Pingback: CSS Sprite Sheet Animations with steps() | Treehouse Blog
Pingback: CSS Sprite Sheet Animations with steps() | Orbit2 Website Design Leeds | Website Design Leeds
How wonderful! I’m using Maverick and Illustrator CC and everything worked beautifully. Can this export work for print at 300 ppi also? Thank you–I can’t wait to put it in use.
Pingback: CSS Sprite Sheet Animations with steps() | JJ SERVER
Hi ..great script. Is there any way to export each 2 layers (individually) without combining them to 1 layer. (from ai to ai AND from ai to PDF)..Also ai to pdf in a HIGH QUALITY setting. Your script that adds the + to combine is great, I just need it to export the files separately. thanks!!
Any way to change the quality of the jpg ? I’d like to be able to export 300Dpi jpg
Pingback: Animación con CSS Sprites y steps()
Pingback: Animación con CSS Sprites y steps()
Great script but completely unusable due to the ridiculously huge file sizes of the generated pdf’s!
Pingback: LookThinkLink: August 7 - LookThinkBlog
This is absolutly perfect. Thanks a lot!
This is one of the most perfect export scripts for Illustrator, but I have one major issue with it, unfortunately.
I’m trying to export all named layers UNDER main layers as it’s easier to keep everything organized. Like this script does (but this doesn’t support SVG or EPS for example). My scripting skills are so poor that I cannot seem to alter either of these to export named groups under main layers. 🙁
Thank you, Thank you, Thank you for making this!! It boggles my mind that Adobe hasn’t made a ‘Layer Comps’ feature in Illustrator yet. …For a step-up on the Layer Comps feature, how possible would it be to include .ai as an export type? As in, it’s an Illustrator file that has been stripped down to only include the visible layers – Just as it’s doing now. This will make it loads easier to pass off the source files to a client or the printers. — On top of that, if it could also Outline everything (CMD + Shift + O), in the .ai export… That would be quite amazing!
Hello,
It seems everybody is happy about this, i was happy to to see this script, but somehow i dont know how to instal it.
I copied on of the scripts from adobe, then i deleted the content and and pasted this script of yours, and then restarted ilustrator and tried the script, the window showed up but nothing happened when i tried to save the artboards. If there is any chance to help me i would really like that, feel really stupid now :/
Anyhow, thank you for the script and helping us!
regards,
i had 1 layer with 25 groups.. i didn’t work then 25 layers with 25 paths each… the same – it shows 0of25 … useless
Worked fine … didn’t read the “instructions”. Thank you!!
Pingback: Get your Assets ready for iOS8 and iPhone 6 Plus - Codemotion
Pingback: Modern Asset Workflow for iOS Development
Pingback: CSS Sprite Sheet Animations with steps()
Fantastic!!! Thanks SO much for posting this!!!!!!! Saved me a TON of time…(used this on CC 2014 on a Mac)
I love this script but it has stopped working (CS6), it is a sad day.
Having some serious issues with this script. I’ve got an ai doc with about 80 icons each in their own artboards named with the filename I want. Im exporting artboards to svg; it gets the first one right, it misses the second (blank) then just starts putting the wrong artboards to the names, then after about 17 just outputs blank svgs. (i can save as svg from arboards normally, but i need these filenames from artboards)
Any ideas to tweak or troubleshoot? Im in a huge timecrunch
Same question as Sherri, I didn’t see response.
I need to select specific PDF export settings that change from time to time.
Like bleed and crops etc.
Exporting 50 business card files front and back with full bleed.
How?
Thanks, great time saver.
If you want to use a specific PDF Presets… Here is what you need to do.
Open the Script with ExtendScript Toolkit and search for:
} else if ( this.format == ‘PDF’ ) {
options = new PDFSaveOptions();
options.compatibility = PDFCompatibility.ACROBAT5;
options.generateThumbnails = true;
options.preserveEditability = false;
Replace it with:
} else if ( this.format == ‘PDF’ ) {
options = new PDFSaveOptions();
options.pDFPreset = ‘NameOfPreset’;
Just edit the ‘NameOfPreset’ with the name of your save preset. in between the ‘
Is there a chance you’ll ever add GIF export options to this script? It would seem no one has done that yet.
Hi, That’s brilliant, thanks.
You may be abble implement the option of artboard size for the export file?
I am currently working on a background for a game which would be projected, the artboards are 50% smaller than reality cause they cannot fit into illustrator drawing area. I wish to export them all at their real size. Any suggestions ? thanks so much.
Excellent script! It worked perfectly, and will save me a bunch of time. I really appreciate you sharing this.
Great. It is working. Thank you very much.
this script looks great – if only i could get it to work(my bad)
when exporting out pdf individual assets the surrounding space of the artboard is included in the file as well – could I please have some direction as to how to correct this?
thanking you in advance
It is an amazing script! Thank you very much. But there’s a small problem, we can’t scale Pdf format, any solution ?
I’m getting Error *: Syntax error.
Line: 1
-> {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf400
Any ideas?
Script also ignores Artboard if it has default name: Artboard 1, Arboard 34…..
Other than that, it’s a great script, thanks!!!
Great scripts! Thank you so much!!! Any chance SVG export could be added?
Heya, again me! 🙂
This script is one of the best ones I used!
Only one thing needs to be changed, “Cancel” and “Export” need to change position one with the other, since illustrator uses form [Confirm] [Cancel]
I ended up canceling my export a bunch of times because of this. Still, this script saved me years of work!
Is there a way to eliminate hyphenation when exporting to JPG? My-file-names-look-like-this(-:
Thanks so much. A real time-saver!
Thanks so much for this script! This saved me so much time!
Would it be possible to add an option to have the artboard name appear after the layer name? Currently it’s ArtboardName-LayerName, but for some purposes I would need LayerName-ArtboardName.
Thanks again!
Hey, so I’ve LOVED working with this script in the past, but just upgraded my machine and need to re-download. When I click through on the download link, it simply opens a new tab with the script displayed. I’m feeling like a complete ditz, but can’t for the life of me figure out how to snag the actual .jsx file. Help!? And so much thanks for your work on this. A lifesaver!
Thanks! This saved me a lot of time!
Thanks, works on Illustrator CC 2014!
I just wanted to report a small bug I found in which my doc would show 0 for export. It seems that if you have an .AI file with multiple artboards ONLY the artboards with names get exported. The problem I encountered was where none of my boards had names, so was seeing “Will export 0 of 40..”.
Note: In order for this script to work, you have to rename your artboards or layers as it won’t work using the default Illustrator artboard or layer names like Layer 1, Artboard 1, etc. I had this problem with Illustrator CC.
Just a quick note in case this is helpful to others: I’m using Illustrator CS6 (16.0.4), and for me, the Scripts folder was inside an “en_US” folder, so the complete path was
/Applications/Adobe Illustrator CS6/Presets/en_US/Scripts/This script worked perfectly and was incredibly helpful — thank you!
Thanks a lot! Great time-saver and the artwork is still editable in Ai after selecting ‘Release Clipping Mask’ (when exporting as PDF).
Note that when creating multiple PDFs, mid-way through it prompts you to save a PDF that will hold all the artboards (now pages) of the original Ai file; if you cancel that it stops the rest of the exporting process.
Thanks again!