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.
I have been searching all over for a script that exports each layer of a illustrator file WITH a base layer always active. EG when making social icons button having the button itself be at the bottom while all 300+ social logo layers are output with an illustrator script while the bottom layer is kept in tact in all other layers that are output by the script. Is there any chance that you could add this or give advice on how to do this? Thank you!
Thanks for sharing this handy script! Cut production time dramatically.
This can’t be true!
I spent hours today exporting two .ai Files with about 200 artboards to
seperate pdfs – searching, trying, crying…at the end I exported each artboard to a
seperate .ai file and converted it manually to a pdf flle 😀
(each other way resulted in pdfs which just showed one artboard however
had each artboard in it -> huge file size and difficult to handle)
This script is great and next time instead of hours it will take me only
a few minutes – thanks to you 🙂
Thank you!
This script is really nice.
It’s exactly what I was looking for.
But I’m geting huge pdfs (16mo) despite the fact that my layers are only vectors.
When I open them in Illustrator and save them again with “smallest file size” pdf settings (perfect for vectors only images), the final sizes are exactly what I expected in the first place (15 to 25ko).
Am I the only one whith this issue ?
Is there another way arround it ?
Badass script! A real time saver 🙂
Thanks!
Thank you! Very cool, saves a ton of time.
Many thanks for publishing this; combined with HicksDesign’s icon template [1] and a few more artboards for the splash screens I’ve gone from no workflow to a rather slick workflow in the space of 10 minutes. I also wasn’t aware of Illustrator’s scripting capabilities before now.
[1] http://hicksdesign.co.uk/journal/updated-ios-application-icon-ai-template
It is very useful.
But Could I put the layer name on head and the artboard name back?
Thank you so much! You just saved me about 6 hours!
Pingback: Free iOS 7 App Wireframing Kit With AI, SVG, PDF and PNG Formats Included
Thank you so much for this, it saved me SO MUCH time.
This is an amazing script! Thank you very much for sharing it. It’s AI CC compatible which makes it even better. Cheers mate!
Great script and works wonderfully! Is there anyway to adapt the script so that you can choose all the export formats at the same time? We often have to take many Illustrator files and convert them to the different formats for downloading for our members (logos, printed materials, etc). Been looking for an Illustrator script that could create multiple outputs, and this is the closest I’ve found so far. Any ideas?
Many many thanks. So many comments, forgive me if someone’s already asked—could the script have a button window where you could click on the various formats (or just one that said ‘all’) for when you need to get all of those different ones?
For next time…
Wow! This is so cool. This is not something they even cover in school! Are there other scripts that helps with projects?
Hi there,
I’d love to get this working but I’m getting the error: “Could not write the file. The file was not found.”
Any ideas?
Would absolutely love to use this… but it doesn’t seem to be working. After installing it (dropping .jsx file into the Illustrator/Presets/Scripts folder and loading it via the scripts menu in illustrator) I get the main window, and after selecting my settings + hitting export the window disappears, nothing happens, and I all I get is a layer called ‘nyt_exporter_info’ (hidden by default) with the following text:
PDF
~/Desktop
100
true
PDF
artboards
I’m running Illustrator CS6 on OS X Mavericks (10.9)
Would appreciate some help as I’d love to use this!!
Thanks
This is awesome, thank you! Would be even awesomer if it supported SVG.
I was able to export when I choose “Layers”, but I can’t export Artboards or Artboards + Layers. When I click the “Export” button, the dialog box closes, but nothing happens. The files are not saved… Any thoughts?
Thanks!
You can disregard my most recent comment, I found the resolution from one of the posts in the comments.
Note for Mavericks, maybe CC users. You have to change the file extension back to .jsx. Right now, download appends .txt to the end. Change it in the get info dialog. Also, you need to use terminal and chmod it to 755 to make illustrator recognize it.
Great script, thank you very much!
This is great…thanks!
Is there any way to install this script so it appears under the Scripts menu item in Illustrator CC? I can only get it to run by selecting Other Script, and loading it manually every time.
Thanks!
Like may here, I’m wondering what the pdf export settings are. Is it an illustrator preset? Is it the same as the source document? It’s especially frustrating because once the PDFs are generated, there’s no way (at least that I can find) to check colorspace or other PDF preferences (which means another batch action to make sure all the layer pdfs are the right spec). But a great script!
Comparing the quality of “Save As” to multipleexporter – I would say that MultipleExporter is rather blurry. Can you tell me why is that?
Many thanks for your work. This great functionality is the anwer to the workflow between graphic designers and web/app developers. I think it’s a must for Illustrator (hope they’ll add your script directly in next versions). Congratulations!
Thanks for the script!
It would be nice if you could add the possibility to export higher dpi png files like 100dpi, 150dpi, 200dpi, 266dpi and 300dpi (or allow users to enter a custom dpi value).
Thanks for this. Would be great to have SVG export supported.
Pingback: Tip // Export those Illustrator layers to png! | GT Comms Design
Great script!
Do you have any tips on how I can adjust the script to export the PNG files at 300dpi for print? I am creating hundreds of stickers for printout.
Thanks!
Thanks so much for the script. That’s exactly what I want and more 🙂
Hi. thanks for the scripts.
I’m using Illustrator CS6. I have made 250 icons in a single artboard. Now i want to export all the layers to eps files but eps8, or eps10 as graphicsriver.com accepts eps8 or 10. How would i do that?
Can I export multiple eps files to a different version. Like if i am using CS6, can i export all the layers to eps8 or eps10 files?
Is there any way that I can set PDF export settings?
Like adding bleed and setting output to PDF/x-1a: 2001…
Love the script – has saved me hours !!! Thank you!
another question- what are the default PDF settings in the script?
Thanks
I wish I knew about this script sooner! Thank you so much!
You are a lifesaver! Many thanks for this great script.
just came across this script, exactly what i needed, to set up an icons collection. now exporting changes has become really easy. thanks so much!
just what i needed! thanks! thanks! thanks!
I too would like to thank you very very very much for the great script, Mr. Ericsson!
It saves more time than I can count!
Though, I would like to know if there is any intention of updating?
I have seen many comments requesting more specific functions like PDF compression, image resolution, etc.
And there are two of them that I would like to emphasize the most: Layer Flattening and Version Compatibility for PDF and EPS.
Pretty please?
If possible, it would much more than ever appreciated!
Thanks again!
Just found this script today, getting really frustrated having to save all artboards to AI files or manually pull apart multipage PDFs when I want to send to our printer, so this is definitely very handy for about half of my work. Being able to pick a PDF preset would make this script truly amazing, because the other half of my work needs bleed and crop marks which I have PDF presets set up for, but I don’t see a way to do that with this script.
I guess I could go old-school and add bleed into the art board dimensions, plus another quarter inch all around to have room for manually adding crop marks, but man that’s more of a pain than just pulling apart the multipage PDFs :-/
just ovations 🙂 very helpful, thank you
nice work, but it doesn’t save all layers when using in AI CC.
is there an update available that also automatically includes the file-name_layer-name and saves in the same folder as the .ai file?
that would be awesome and I would be willing to pay for the work done.
keep up the good work
I seem to be having the same problem as Sasha, expect it puts the file path and everything I entered in the dialog box… just no files. Same OS and CS6 as well. Could it be a version issue? Could it be because I am using the script and opening/exporting files through a server/network (its all on the same drive)? Ive had that be an issue with other scripts but in this case its not practical to save to my desktop. Is there anyway to change that in the script? Thanks!
Nevermind, I figured out that all I have to do is temporarily save the working Ai file to the desktop and it works perfectly! Thank you! You just saved me a whole days worth of work! 😀
Sasha, I was having the same issue and then read closer and realized that you need to rename the layers for them to export properly.
This is a FABULOUS script and I’m thrilled to have found it. Thank you, thank you!
Hey, this is awesome! Just wondering if I can hire you for some Adobe Illustrator scripting project?
What a lifesaver!
This is a spectacular script! It has already saved me hours worth of work. Where can I send a donation?
This is amazing, but is there any way to make it save the .png’s at the size of the layer content as opposed to the artboard size for every layer? I use illustrator to mockup websites and it would be so useful to be able to save each element on a different layer and have them export at the right size.