Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

A script that could improve my whole job

New Here ,
Dec 13, 2024 Dec 13, 2024

Hi! I'm kinda new into scripting and writing js for Illustrator.

 

I work as a designer for a print shop, where we do all kinds of jobs and orders, some are from other designers or sellers (they send us their files for printing or production in general), and some others are for the general public (where we design ourselves).

 

Our workflow is based on the creation of a "client preview", where we make a template that has some basic info, such as the client's name, the requested material, the requested polishings or finishes, deadline for delivery and quantity of the production to print. It also contains the design itself, with dimensions on it (width x height, in cm or meters).

 

We send a screenshot of this preview to the client, they authorize it, and then we prepare our files for printing or production. The files always have the same resolution, the same margins or bleed/cutouts depending on the material, material width, polishings or finishes, or quantities (we make a unique file when we have multiple pieces of the same design).

 

usually the whole process takes about 15-20mins (When we get inmediate approval), and that's for making the client's preview and preparing the files for printing. But the process is always the same for every type of material, finishes and quantities.

 

My question is, Would it be possible to make a script that could do all these steps by only putting the needed information in the requested fields and specifying the margins and bleedouts for every type of finishes? If so, how much time do you think something like this would take to create from scratch?

 

The steps that would be needed are as it follows:

- set artboard size to artwork / create artboards for multiple artworks

- Generate the preview template, in a new layer that's under the art itself, with the requested info

- Generate dimension lines for the individual artwork/artboard or multiple artworks/artboards

- Create a folder with the current day of the month, within another folder with the current month, within another folder of the client's name (example: Rob Doe - December - 14)

- Generate a .tif file with different DPI's and margins, depending on the material (this info could be pretty much a drop-down menu or a database), or a .PDF file for DTF, or a .DXF file for Laser Cut, saved inside the folder mentioned above.

- Generate a .tif file with the artwork resized proportionally to 30cm at the biggest side (width or height), saved alongside the tif mentioned above.

 

If this is actually possible to make in a script, the whole process in my job would pass from 15-20mins to merely seconds. So I would love to know if everything I've mentioned here is actually posible to program, if so, where could I learn everything needed to get it working?

 

Here's a picture of what the client's preview looks like.

 

Thanks in adavance for reading all this! Gretz from Chile!

TOPICS
How-to , Scripting , Third party plugins
330
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 14, 2024 Dec 14, 2024

What you have described sounds do-able via scripting. If you would like to learn how to do it yourself, which i definitely recommend as it is easier to troubleshoot problems and you'll learn a skill thats quite invaluable, I would start very simple with some script ideas and expand on it. Things like just making a textframe and put text in it. moving an object somewhere on the document. changing the artboard or adding new ones.

Scripting for Illustrator is built off of a slightly outdated javascript framework and using adobe's own syntax to create a language called Extendscript. Files you create would be .jsx files that are "javascript extended". The general framework for illustrator scripting mirrors the layer structure. If you want to access a text frame inside layer 1. you would targeting the application, then the document, then the layer, then the textframe.

app.activeDocument.layers[0].textFrames[0]

Every element for scripting will have both properties and methods. a property is a readable, usually writable, value of that element. the geometric bounds are a property you can access while looking at the textFrame, the contents of the text frame are a property that can be accessed. A method is a built-in function that that element can perform. textFrame.createOutline() is a function that will convert the targeted textframe to outlined graphics.

var myTextFrame = app.activeDocument.layers[0].textFrames[0]
myTextFrame.contents /*would return whatever the contents are*/
myTextFrame.createOutline() /*would convert the text frame into outline paths*/

For your script you would probably want to utilize a UI window to input some information and then have it create the desired documentation. I have a script setup that does just that for my companies packaging process. every package gets put onto a frame that outlines the specifications for printing, the inks used, the dieline used, and some other information like modification dates. it was originally a non-documented 15-30 min process, if not longer if it was your first time. It's now 30 seconds to a minute at most. 

 

some resources to get started

Documentation for the illustrator framework. https://ai-scripting.docsforadobe.dev/index.html

The ScriptUI panel can be a tricky thing to understand, someone built a fantastic web tool to assist with making them. https://scriptui.joonas.me/

W3schools isnt the best documentation for javscript but I think it works just fine. Some stuff is too new for the javscript engine that extendscript uses and therefore doesnt exist. https://www.w3schools.com/jsref/default.asp 

For Coding, I use Visual Studio Code to write the scripts. most any texteditor would work though. https://code.visualstudio.com/ 

 

I started scripting for indesign and illustrator about 4-5 years ago, knowing absolutely nothing. a lot of trial, error, and picking apart other peoples code is how I learned. I would start with some service to learn basic javascript so you can understand strings, objects, arrays, and more. Then once you have a grasp on javascript, dive into the documentation for illustrator and start fiddling around.

 

Hope this helps! feel free to ask more questions

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 16, 2024 Dec 16, 2024
LATEST

Everything RobOctopus said, this is totally doable.

I created a load/preflight script for my group that detects the art on a client proof, replaces all fpo images with high-res links, adds bleed, checks rich blacks, and scales from letter size proofs to production 1:12 or 1:24 scale billboards in over 216 unique sizesk on over 14substrates... all while checking all the usual trap/overprint/etc issues that production art needs for each type of material and press requirements. We tripled our work capacity and reduced prepress time investment by 75% in three months with much of what you are looking to do.

My advice for you is that start by organizing your tasks, put them in the order you wish them to be run and work on each section independently until you're happy with each result... then afterwards combine into the larger "finished" script for deployment. It will make your troubleshooting and dev cycle much easier to manage, and enable you to focus on specific roadblocks you may encounter. It will also give you a "toolbox" of mini scripts that you can use to achieve specific tasks without running the entire script only.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines