Adobe Illustrator logo export workflow showing Excel file naming, CMYK and PMS print exports, RGB handoff, and digital PNG export automation.
Design Systems

How to Build a Two-Step Adobe Illustrator Logo Export Generator

A step-by-step look at the two-script JSX workflow I built to generate print CMYK and PMS EPS files, then export RGB PNG logo files cleanly and consistently from Adobe Illustrator.

By Mike Ibanez January 15, 2026 18 min read

The Problem This Script Was Created to Solve

Manual logo exporting creates several small risks that add up quickly:

  • A print EPS might accidentally be exported from an RGB file.
  • A digital PNG might accidentally be created from CMYK artwork.
  • PMS files might end up mixed with standard CMYK files.
  • A vendor might receive the wrong black, white, or reversed version.
  • Artboard names might not match the final file naming list.
  • Temporary export files might be left behind.
  • A designer might forget to remove print-only details from the digital file.

For one or two logos, this is manageable. For a larger naming system, it becomes repetitive and easy to get wrong. The script was created to turn that process into a controlled workflow.

Why the Workflow Is Split into Two Scripts

At first, it seems like everything should happen in one script. The file could generate the print assets, switch to RGB, and export the PNGs all in one pass.

The problem: Adobe Illustrator can become unstable after a script changes the document color mode from CMYK to RGB. Sometimes the document reference becomes unreliable after running the RGB conversion command. This makes the next export step harder to trust.

Step 1: Print and Handoff Preparation

The first script runs from the original CMYK Illustrator file. It creates the print package, exports CMYK EPS files, then saves a separate -PNG.ai copy for digital use. That copy is cleaned up, converted to RGB, saved, and then the script stops.

Step 2: Digital PNG Export

The second script runs from the saved RGB -PNG.ai file. It updates the RGB brand colors, gives the user one last chance to rename artboards, and exports transparent PNG files at 4x scale.

This split protects the print files from accidental RGB export and protects the digital PNGs from accidental CMYK export.

Current Workflow

The naming workbook is a production reference. It does not communicate directly with Illustrator or either JSX script.

Logo-Generator-File-Naming.xlsx
        ↓
Prepare standardized filenames
        ↓

Logo Generator - STEP 1.jsx
        ↓
Original CMYK Illustrator file
        ↓
EXPORTS/PRINT
EXPORTS/PMS
        ↓
RGB *-PNG.ai handoff
        ↓

Logo Generator - STEP 2.jsx
        ↓
EXPORTS/DIGITAL
Transparent 4x RGB PNG files

Use the workbook alongside the scripts: replace SAMPLE with the logo suite's base name, then use its generated naming order when each script asks you to rename artboards.

What the Final Folder Structure Looks Like

After both scripts are run, the project folder is organized like this:

Project Folder
├── OriginalFile.ai
├── OriginalFile-PNG.ai
└── EXPORTS
    ├── PRINT
    │   └── CMYK EPS files
    ├── PMS
    │   └── PMS EPS files
    └── DIGITAL
        └── RGB PNG files
  • EXPORTS/PRINT contains the standard CMYK EPS files.
  • EXPORTS/PMS contains the PMS EPS files.
  • EXPORTS/DIGITAL contains only RGB PNG files.
  • OriginalFile-PNG.ai is the cleaned RGB handoff file used by the digital export script.

What the Illustrator File Needs Before Running the Scripts

The scripts depend on a consistent Illustrator structure. Before running anything, prepare the file with predictable layer, group, and swatch names.

Required Source Container

The script looks for a main artwork container named:

source

If it does not find that, it looks for:

Content 1

Required Artwork Groups

Inside the source artwork, the script expects these groups:

Name
Orange Divider
Wordmark
Registered
  • The Name group is where the custom name text lives. The script outlines this text so the exported files do not depend on live fonts.
  • The Orange Divider and Wordmark groups are recolored for the different versions.
  • The Registered group is removed from the digital handoff file where needed.

Required Swatches

The source file should include these swatches:

Titan Blue
Titan Orange
PANTONE 540 C
PANTONE 151 C
Black
Spot Black
White
Opaque White

Important: The script uses those swatch names exactly. If a swatch is missing or named differently, that part of the recolor process will not work as expected.

For this workflow, Spot Black is used as the spot black swatch name instead of relying on a Pantone black name. White is handled with both White and Opaque White, depending on whether the version is standard or PMS/vendor-facing.

What Step 1 Does

The Step 1 script is the print production script. It should be run from the saved CMYK source file.

High-Level Sequence

  1. Check that an Illustrator document is open.
  2. Check that the document has been saved.
  3. Stop if the document is already RGB.
  4. Find the source artwork container.
  5. Outline text inside every Name group.
  6. Apply the base CMYK brand colors.
  7. Duplicate the artwork into the required print and PMS variations.
  8. Show one rename dialog so the artboard names can match the final naming list.
  9. Export each artboard as an EPS.
  10. Send standard EPS files to EXPORTS/PRINT.
  11. Send PMS EPS files to EXPORTS/PMS.
  12. Remove temporary EPS files created during export.
  13. Save a separate -PNG.ai copy.
  14. Remove PMS-only content from the -PNG.ai copy.
  15. Remove registration marks from the digital handoff where needed.
  16. Rearrange the remaining digital artboards.
  17. Convert only the -PNG.ai copy to RGB.
  18. Save the RGB copy and stop.

Note: The script intentionally does not show a final success popup. It only shows alerts when something needs attention.

Logo Variations Created

The source artwork becomes a set of named layers and artboards:

blue-orange
blue-orange-pms
blue
blue-pms
black
black-pms
white
white-pms
blue-white
blue-white-pms
orange-white
orange-white-pms

That pairing matters because the script uses the artboard name to decide where each EPS file should go. Anything with pms in the artboard name is exported into the EXPORTS/PMS folder.

How the EPS Export Works

Illustrator does not always export a single EPS exactly the way a user expects when scripting single-artboard output. To make the process more reliable, the script creates a temporary EPS file for each artboard, finds the EPS Illustrator actually generated, copies it to the final folder, then deletes the temporary file.

This keeps the final folder clean and prevents old temporary files from being mistaken for finished assets.

The EPS export settings also force print-focused options:

epsOptions.cmykPostScript = true;
epsOptions.embedAllFonts = true;
epsOptions.embedLinkedFiles = true;
epsOptions.includeDocumentThumbnails = true;

What Step 2 Does

The Step 2 script is the digital export script. It should be run only from the RGB -PNG.ai file created by Step 1.

Sequence

  1. Check that an Illustrator document is open.
  2. Check that the document has been saved.
  3. Stop if the document is not RGB.
  4. Show one rename dialog so PNG filenames can be finalized.
  5. Update Titan Blue to #00244E.
  6. Update Titan Orange to #FF7900.
  7. Reapply the RGB swatches to the expected logo groups.
  8. Normalize matching direct RGB fills and strokes.
  9. Export every artboard as a transparent PNG.
  10. Save the PNG files into the EXPORTS/DIGITAL folder.
  11. Save the active RGB Illustrator file.

Why Colors Are Updated Again

When an Illustrator file is converted from CMYK to RGB, the converted color values are not always the exact digital brand values you want.

That is why Step 2 does not simply trust the converted color mode. It updates the RGB process swatches directly:

var hexBlueNew = "#00244E";
var hexOrangeNew = "#FF7900";

Then it reapplies those swatches to the expected artwork groups. The script also checks for direct RGB fills and strokes that visually match the old colors, then normalizes them back to the updated swatches. This helps catch artwork that may not be connected to the swatch after conversion.

Why the PNG Export Is Set to 4x

The digital PNG export uses Illustrator's PNG24 export option:

var pngOptions = new ExportOptionsPNG24();
pngOptions.artBoardClipping = true;
pngOptions.horizontalScale = 400.0;
pngOptions.verticalScale = 400.0;
pngOptions.transparency = true;

The 400.0 scale values create a 4x export. This produces higher-resolution PNG assets while still clipping each export to its artboard.

The transparency setting keeps the background transparent, which is usually what users expect from digital logo files.

The Three Workflow Resources

The workflow uses two JSX scripts and one Excel workbook. The scripts are provided below as complete, readable code for reference and copying. The workbook is the reusable naming reference and the only workflow file available from this page.

  • Logo Generator - STEP 1.jsx — PRINT and PMS preparation script. The complete source code is provided directly in this article for reference and copying. It runs from the original CMYK Illustrator file, creates the print EPS packages, and prepares the RGB handoff for Step 2.
  • Logo Generator - STEP 2.jsx — DIGITAL RGB PNG export script. The complete source code is provided directly in this article for reference and copying. It runs from the RGB -PNG.ai handoff, updates the digital colors, and exports transparent 4x PNG files.
  • Logo-Generator-File-Naming.xlsx — Reusable Excel naming workbook. It generates standardized filenames and organizes print, PMS, digital, horizontal, vertical, alternate, and email-signature logo variations for use alongside the two scripts.

Why the Resources Work Together

Use the workbook first to replace SAMPLE with the logo suite's base name and prepare the artboard naming order. Run Step 1 from the original CMYK file to create EXPORTS/PRINT, EXPORTS/PMS, and the RGB -PNG.ai handoff. Then run Step 2 from that RGB handoff to create EXPORTS/DIGITAL.

Download the Naming Workbook

Logo-Generator-File-Naming.xlsx

Use this Excel workbook to generate and organize standardized filenames for print, PMS, digital, horizontal, vertical, alternate, and email-signature logo variations.

Download the Logo File Naming Workbook

How to Use the Scripts

1. Prepare the Illustrator File

Start with the official CMYK Illustrator file. Make sure the file is saved and includes the required source container, groups, and swatches. The file should not already be RGB.

2. Run Step 1 from the CMYK Source File

Open the CMYK source file in Illustrator and run:

Logo Generator - STEP 1.jsx

When the rename dialog appears, paste or type the final artboard names. Use one name per line, or paste comma-separated names.

After Step 1 runs, you should have:

EXPORTS/PRINT
EXPORTS/PMS
OriginalFile-PNG.ai

The print EPS files are complete at this point.

3. Open the RGB -PNG.ai File

Open the newly created file:

OriginalFile-PNG.ai

This file should already be RGB. If the file is still CMYK, Step 2 will stop and alert you.

4. Run Step 2 from the RGB Handoff File

Run:

Logo Generator - STEP 2.jsx

When the rename dialog appears, confirm or update the artboard names for the PNG files.

After Step 2 runs, you should have:

EXPORTS/DIGITAL

The PNG files inside that folder are RGB, transparent, and exported at 4x scale.

Where to Install the JSX Files

There are two common ways to run Illustrator JSX scripts.

Option 1: Run from Illustrator

In Illustrator, go to: File > Scripts > Other Script...

Then choose the JSX file you want to run. This is the easiest option while testing.

Option 2: Install into the Illustrator Scripts Folder

You can also place the JSX files inside Illustrator's Scripts folder. After restarting Illustrator, they will appear under: File > Scripts

This is better once the script is ready for regular production use.

How to Adapt This for Another Logo System

The script is specific to this CSUF workflow, but the pattern can be reused. The main things to update are:

Layer and Group Names

Change these names if your source artwork uses a different structure:

var parentName = "source";
var parentFallbackName = "Content 1";
var nameSub = "Name";
var orangeDividerSub = "Orange Divider";
var wordmarkSub = "Wordmark";

Swatch Names

Update the swatch names to match your Illustrator file:

var swTitanBlue = "Titan Blue";
var swTitanOrange = "Titan Orange";

Also update the PMS and spot swatch names:

"PANTONE 540 C"
"PANTONE 151 C"
"Spot Black"
"Opaque White"

Digital RGB Values

In Step 2, update the RGB values here:

var hexBlueNew = "#00244E";
var hexOrangeNew = "#FF7900";

Export Scale

To change the PNG scale, adjust these values:

pngOptions.horizontalScale = 400.0;
pngOptions.verticalScale = 400.0;

For example:

100.0 = 1x
200.0 = 2x
300.0 = 3x
400.0 = 4x

Folder Names

The print and digital folders are defined in the export functions:

var printSubFolder = "PRINT";
var pmsSubFolder = "PMS";
var subFolderName = "DIGITAL";

You can rename those if your asset library uses a different folder structure.

Practical Lessons from Building This

The biggest lesson is that automation should follow the production logic, not just the software commands.

Keep Production Stages Separate

For this project, that meant keeping print and digital exports separate, even though a single script would have looked cleaner on paper. It also meant giving the designer one rename dialog before each export stage, because file names are often tied to a naming list that may change until the last minute.

Avoid Unnecessary Confirmation Popups

The script also avoids unnecessary confirmation popups. In a production workflow, extra popups slow people down. Errors still need to be visible, but a final success message is not always useful when the exported folders already show the result.

That is what this two-step workflow is designed to do.

Full Code

Source of truth: This section shows the complete current supplied .jsx source for reading and copying.

Step 1: PRINT and PMS Preparation

Logo Generator - STEP 1.jsx

Loading the current source…

Step 2: DIGITAL PNG Export

Logo Generator - STEP 2.jsx

Loading the current source…

Ready to Implement This Workflow?

This two-step approach is designed for logo systems with multiple color and format variations. The pattern works equally well for other export workflows where color mode separation and naming consistency matter.

For questions about adapting this workflow to your specific needs, feel free to reach out. Each project is different, but the core principles—protect the user, create predictability, and stay clean—apply everywhere.

"A good export script should do three things well: protect the user from creating the wrong kind of file, create a predictable folder and naming structure, and leave the working directory clean when it is done."