Skip to content

Osva1d/extendscript-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExtendScript Automation for Adobe Illustrator

Version License

A professional toolkit of JavaScript (.jsx) scripts that automate prepress preparation and speed up production work in Adobe Illustrator.

Language: English · Čeština


Table of contents


Features

Three independent scripts that share the same conventions and UX standards:

  • Multilingual UI — Czech and English, switched automatically by Illustrator's locale
  • Named presets — saved configurations with automatic recall of the last-used one
  • Layer management — smart handling of layers and spot colors
  • Large Canvas support — works with native Illustrator Large Canvas and with manually scaled-down documents (1:N workflow)
  • Robust input validation — all inputs are validated; no silent fallbacks to zero, no crashes
  • Zero dependencies — pure ExtendScript, no external libraries or CEP panels

Script-specific features are documented in the Scripts section.


Requirements

  • Software: Adobe Illustrator CC 2020+ (tested on CC 2024 and CC 2025)
  • OS: macOS 12.0+ / Windows 10+
  • Hardware: Zünd (ECHO) and Summa cutters (optional — scripts also work without a machine for data preparation)

Installation

  1. Download the latest .jsx files from Scripts/.
  2. Copy them to Illustrator's script folder:
    • macOS: /Applications/Adobe Illustrator [Version]/Presets.localized/en_US/Scripts
    • Windows: C:\Program Files\Adobe\Adobe Illustrator [Version]\Presets\en_US\Scripts
  3. Restart Adobe Illustrator.
  4. The scripts appear under File → Scripts.

Detailed macOS guide: docs/INSTALL_MAC.txt.

Run without installing: File → Scripts → Other Script… (Cmd + F12) → pick the .jsx file.


Scripts

# Script Version Purpose
1 illustrator-zund-summa-marks.jsx 26.5.0 Registration mark generator for Zünd + Summa, named presets, localisation
2 illustrator-grommet-marks.jsx 4.2.0 Banner grommet marks
3 illustrator-batch-relink-export.jsx 3.0.0 Batch-relink PDFs into .ai imposition templates and export print-ready PDFs

1. illustrator-zund-summa-marks.jsx

Full-featured registration-mark generator for Zünd (ECHO) and Summa (OPOS) cutters.

Features:

  • Two technologies (ZUND circular marks, SUMMA square + OPOS bar)
  • Auto-fit (artboard adapts to artwork) and Fixed (marks placed inside the artboard) modes
  • Corner-to-corner interpolation — mark pitch from 5 mm
  • Dynamic mapping of layers to spot colors (up to 8 rows)
  • Marks-only mode — for documents with already-separated layers: draws only the marks, leaves your layers untouched
  • Trim lines (SUMMA) in a dedicated top-level "Trim" layer
  • Named presets + auto-saved last-used settings; ↺ Revert to a preset's saved values
  • Manual 1:N scale for scaled-down documents + automatic Large Canvas handling
  • Detects and respects clipping masks

Usage: Open artwork → run the script → pick the cutter (ZUND/SUMMA) → set parameters → Generate.

Persistence: ~/Library/Application Support/ZSM/settings.json

Workflow with scaled-down documents (1:10)

If you design at a reduced scale (e.g. a 500×500 mm document represents a real 5000×5000 mm format), enter values in document scale, not real-world mm:

Real-world size Enter in dialog (1:10)
5 mm marks 0.5 mm
5 mm gap from artwork 0.5 mm
400 mm mark pitch 40 mm

Tip: Since v26.4.0 you can instead tick "Work in scale" and enter a 1:N ratio — the script converts real-world mm for you, so you no longer have to pre-divide every value by hand.

For true Adobe Large Canvas mode (artboard > 5765 mm, scaleFactor = 10) the script detects the scaling automatically — enter real-world values.


2. illustrator-grommet-marks.jsx

Generator of grommet marks (eyelets / banner rings) for large-format and banner workflows.

  • Circular marks with size presets
  • Independent configuration per edge (top / bottom / left / right)
  • Global X/Y offset for precise positioning
  • Persistent settings between runs

Usage: Open artwork → run the script → set per-edge parameters → OK.


3. illustrator-batch-relink-export.jsx

Batch-relinks PDF files into an .ai imposition template and exports print-ready PDFs. Ideal for personalised print runs (business cards, tickets, flyers) where every sheet shares one layout but carries different content.

How it works: point the script at a template (a multi-up .ai with linked PDF positions), a folder of pre-split source PDFs (one per sheet), and an output folder. The script relinks every position to each source file and exports one PDF per sheet.

Features:

  • Relinks all linked PDF positions on a sheet, then exports with the chosen PDF preset
  • Verifies every relink (each position points to the expected file) before exporting
  • Automatically unlocks and restores locked layers and objects
  • Pre-flight scan of all sources against the template's position count; hard-blocks risky files (more pages than positions, or an ambiguous page count) to prevent silently dropping pages
  • Predictable, natural sheet numbering (part_2 before part_10)
  • Output naming via a pattern — {n} (sheet number), {template}, {source}
  • Pre-run preview (skipped for a clean batch); skip-existing for crash recovery
  • Ignores macOS sidecar files (._*) on flash drives; localised CS / EN

Usage: run the script → pick the template, source folder, and output folder → set the naming pattern and PDF preset → confirm the preview → done.

Note — short last sheet: if the last source file has fewer pages than the template has positions, the surplus positions cannot always be removed automatically (Illustrator does not expose the page index of manually placed, clipped PDFs). The script exports the sheet and reports "N extra positions — remove manually". Tip: pad the source to a full multiple of the position count to avoid this entirely.


Troubleshooting

Script does not appear in the menu Check:
  • The file extension is .jsx (not .jsx.txt — macOS Finder may hide the extension).
  • The file is in the correct folder for your Illustrator language: en_US vs cs_CZ.
  • Restart Illustrator after copying the file.
Error: "Nothing is selected" Auto-fit mode requires an active selection or visible artwork in the document. Either select the artwork (Cmd+A) or switch to "By Artboard" (Fixed) mode.
Marks are placed off canvas / off artboard In Auto-fit mode the script expands the artboard. In Fixed mode the artboard stays and marks are placed inside it. Also check:
  • No locked layer blocks the calculation (the script temporarily unlocks them).
  • No guides extend the bounds (the script ignores guides, but non-guide off-canvas paths can inflate bounds).
"Generate" button does nothing Validation failed. Check the input fields:
  • No empty fields (since v26.3.x an empty input is an error, not a silent 0).
  • Values within the allowed range (e.g. mark pitch 5–5000 mm).
  • For scaled-down documents enter values in document scale — see 1:10 workflow in the Zünd & Summa Marks section.
Illustrator crashed ExtendScript can trigger a C++ crash in Illustrator that try/catch cannot recover from. Known causes (all mitigated in v26.3.x):
  • Undo + re-running without a restart — DOM in inconsistent state.
  • Bracket-named layers <Clip Group>, <Group> — the script now avoids mutating them.
  • Very large coordinates (>16383pt) — the script validates values.
If a crash still occurs, please report it to the author with a description of the document (Layers panel) and the action sequence.
A preset "got lost" or changed unexpectedly Since v26.3.x named presets are immutable. Generate does not modify them — only the Save button commits the current UI values into the active preset. To save as a new variant, use Save As. The modified indicator (asterisk * next to the name) signals unsaved changes.

Changelog

Format: Keep a Changelog — categories Added / Changed / Fixed / Removed / Security.

v1.5.0 (2026-06) — Grommet Marks v4.2.0

  • Added: ↺ Revert button next to the preset dropdown (reload a preset's saved values).
  • Changed: Two-row preset panel (Save / Save As / Delete below the dropdown), matching the Zünd & Summa Marks layout.
  • Changed: Appearance dropdowns aligned via a fixed label column.
  • Removed: Reset button (replaced by ↺ revert) and the Round/Square shape choice — marks are now always circular.
  • Fixed: Live validation restored the default text colour (no black-on-dark fields).

v1.4.0 (2026-06) — Zünd & Summa Marks v26.5.0

  • Added: "Marks only" mode — for documents with already-separated layers; draws only the marks and leaves user layers untouched.
  • Added: ↺ Revert button next to the preset dropdown (reload a preset's saved values).
  • Changed: Trim lines (SUMMA) now always go into a dedicated top-level "Trim" layer (out of Regmarks and cut layers).
  • Removed: Reset button — factory defaults via the [Default] preset, preset revert via ↺. Footer is now Cancel + Generate only.
  • Fixed: Spurious "modified" asterisk on presets using the registration colour in a localised (CS) Illustrator.
  • Fixed: Invalid input could leave the dialog stuck (field red, Generate disabled) even after correcting the value or reverting.
  • Fixed: Illustrator C++ crash when generating SUMMA marks with trim lines.

v1.3.0 (2026-06) — Batch Relink & Export v3.0.0

  • Changed: Complete rewrite of Batch Relink & Export — modular ExtendScript, robust safety, CS/EN localisation.
  • Changed: Output naming via a placeholder pattern ({n} / {template} / {source}, default {n}_{template}).
  • Added: Relink verification, automatic unlock/restore of locked layers and objects.
  • Added: Pre-flight scan of all sources; hard-blocks files with more pages than positions or an ambiguous page count.
  • Added: Short last sheet reported for manual cleanup ("N extra positions — remove manually").
  • Added: Natural (numeric-aware) source ordering for predictable sheet numbering.
  • Fixed: macOS AppleDouble (._*) sidecar files in the source folder are ignored.
  • Removed: Standalone imposition script (dead development branch).

v1.2.1 (2026-05) — Zünd & Summa Marks v26.3.2

  • Fixed: "Mark pitch" validation minimum lowered 50 → 5 mm. 1:10 scaled-down workflows no longer block the Generate button.
  • Added: "Scaled-down workflow" section in the Zünd & Summa Marks documentation.

v1.2.0 (2026-04) — Zünd & Summa Marks v26.3.1

  • Added: Stable presets (immutable named presets, modified indicator *).
  • Added: Save / Save As / Reset split.
  • Added: E2E test workflow + ES3 compliance linter.
  • Fixed: Clipping-mask boundary detection + skip Regmarks layer.
  • Fixed: Empty-string validation (Number("") quirk).
  • Fixed: main.jsx read a stale preset instead of [Last Settings].
  • Fixed: Array.map in ExtendScript (ES3 compliance).
  • Security: Defensive measures in render() against C++ pipeline crashes.

v1.1.x (2026-02) — Grommet Marks v3.0.0

  • Added: illustrator-grommet-marks.jsx.
  • Changed: Unified script headers (Script / Version / Author / Updated).

v1.0.x (2025–2026) — Initial public release

  • Added: First public release of the script suite — Zünd & Summa Marks, Batch Relink, Zünd Board Workflow.

Licence

This project is licensed under the GNU General Public License v3.0 — see LICENSE (full text) and COPYRIGHT (summary + third parties).

What this means in practice:

  • You can freely use the software for any purpose — personal, academic, or commercial (e.g. inside a print shop).
  • You can modify the software and create derivative works.
  • If you distribute a modified version (resell or publish it), you must keep the GPL-3.0 licence and make the source available.
  • The software is provided "as is", without any warranty.

Commercial licence: If the GPL-3.0 terms (in particular the obligation to publish modifications) are incompatible with your use case, a commercial licence can be negotiated separately. Contact the author.

Third parties: json2.js by Douglas Crockford — public domain.


Support the project

If the suite saves you time in daily work and you want to fund further development:

  • Buy Me a Coffee — one-off tip, localised currency (USD / EUR / CZK / …).
  • GitHub Sponsors — one-off and recurring contributions.
  • Issues and Pull Requests — bug reports, ideas, and improvements are welcome in Issues.
  • Sharing — a mention in your community (printshop forums, LinkedIn) is the cheapest form of support.

Author

  • Concept & development: Ladislav Osvald (Osva1d)
  • Year: 2025–2026
  • Contact: via GitHub Issues or direct message

About

Adobe Illustrator ExtendScript tools for prepress automation

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors