Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

194
Visualizações
Draw shapes on a layer in InDesign using CEP/JavaScript/ExtendScript

I would like to be able to add shapes (for example a circle) on a new layer that I create beforehand.

My request is similar to this question:

Draw circle on a new layer in Photoshop using cep/Javascript but for InDesign.

I tried the code but it doesn't work, I think PathPointInfo (and probably some other stuff) is not in the API of InDesign.

I did a lot of research but couldn't find what I needed

Thank you in advance for your help !

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

var cr = app.activeDocument.pages[0].ovals.add(); //add a circle in active documents first page
cr.geometricBounds = [10,10,100,100];             //apply geometry to the circle
cr.strokeWeight = 0.1;                            //adding stroke weight
cr.strokeColor = app.activeDocument.swatches[3];  //choose color from active document's swatch

From here: https://community.adobe.com/t5/indesign-discussions/script-to-create-multiple-circles-in-specific-locations/td-p/10644580

about 4 years ago · Juan Pablo Isaza Relatório

0

I found a solution using the polygons :

  var doc = app.activeDocument;      
  var page = doc.pages.item(0);    
  var pl = page.polygons.add();

  var myArr = [
    [258,583],
    [255,583],
    [255,582],
    [254,582],
    [253,580],
    [250,579],
    [249,578],
    [248,576],
    [248,575],
    [248,574],
    [246,573],
    [246,571],
    [246,570],
    [246,566],
    [246,565],
    [246,564],
    [249,562],
    [250,561],
    [252,561],
    [253,561],
    [255,561],
    [257,561],
    [258,561],
    [262,561],
    [263,561],
    [264,560],
    [264,561],
    [264,562],
    [264,564],
    [264,565],
    [264,566],
    [264,567],
    [264,570],
    [264,571],
    [264,573],
    [264,574],
    [264,575],
    [264,576],
    [263,576],
    [262,578],
    [262,579],
    [261,579],
    [259,579]  
  ];

  pl.paths.item(0).entirePath = myArr;
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda