Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
Aligning text to artboard in illustrator script

I've cobbled together a simple script to generate a series of files from a template with text added. The problem is that the text is way off the artboard no matter what co-orinates I put as the text.position.

How do I get the text in a certain position ?

Here is my code below:

#target Illustrator

function ProcessFiles()
{

    var IllustratorSaveOptions
    const alphabet= ["A", "B", "C", "D", "E", "F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];

    for(firstletter = 0; firstletter < 1; firstletter++){
         for(secondletter = 0; secondletter < 26; secondletter++){
        File = app.open(new File("E:/Products/Stencils/TEST/CUS_FORK_01.ai"));

        var doc = app.activeDocument;
            var text = app.activeDocument.layers[0].textFrames.add();
        text.textRange.characterAttributes.size = 1200.5;
        text.textRange.characterAttributes.textFont = app.textFonts["TartineScriptRegular"];
            text.contents = alphabet[firstletter] + "     " + alphabet[secondletter];
        text.position = [2700, 2000];

        var filename = alphabet[firstletter] + "+" + alphabet[secondletter] + ".ai";
                doc.saveAs(new File("E:/Products/Stencils/TEST/" + filename));
            doc.close(SaveOptions.DONOTSAVECHANGES);
     };
    };
};
ProcessFiles();

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!