Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

172
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda