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

Scaling multiple objects using javascript in InDesign

Community Beginner ,
Jul 14, 2017 Jul 14, 2017

Copy link to clipboard

Copied

How to scale multiple objects programatically using javascript in InDesign (grouping and ungrouping).

For example, Rectangle, TextFrame, Oval and ellipse tools selection.

Thanks,

Nehru

TOPICS
Scripting

Views

1.8K

Translate

Translate

Report

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
Community Expert ,
Jul 14, 2017 Jul 14, 2017

Copy link to clipboard

Copied

Moving to InDesign Scripting forum

Votes

Translate

Translate

Report

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
Engaged ,
Jul 14, 2017 Jul 14, 2017

Copy link to clipboard

Copied

Hi,

Try this..

var myDoc = app.activeDocument;

var objects = myDoc.selection;

         var  xScale = 80 / 100; 

         var  yScale = 80 / 100; 

    

    for (t=0; t<objects.length; t++) { 

                     objects.horizontalScale = objects.horizontalScale * xScale;  

                     objects.verticalScale = objects.verticalScale * yScale; 

    } 

Thanks,

prabu G

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.

Votes

Translate

Translate

Report

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
Enthusiast ,
Jul 15, 2017 Jul 15, 2017

Copy link to clipboard

Copied

Try my scripts to resize based on factors.

You can set a factor to multiply the current sizes.

The code will resize all selected objects based on the center anchor point.

http://lf.corullon.com.br/scripts_id_lfc/index_enus.html

Em 15 de jul de 2017 3:21 AM, "Ananth@desgin" <forums_noreply@adobe.com>

escreveu:

Adobe Community <https://forums.adobe.com/?et=watches.email.thread>

Scaling multiple objects using javascript in InDesign

resposta de Ananth@desgin

<https://forums.adobe.com/people/Ananth%40desgin?et=watches.email.thread>

em InDesign Scripting - Visualize a discussão completa

<https://forums.adobe.com/message/9704042?et=watches.email.thread#9704042>

Votes

Translate

Translate

Report

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
Community Beginner ,
Jul 17, 2017 Jul 17, 2017

Copy link to clipboard

Copied

LATEST

If we select multiple objects and scale continuously then at one point, I am getting the following message. "This value would cause one or more objects to leave the pasterboard". How to calculate the size of absoluteHorizontalScale that cause this message programmatically using JavaScript.

Thanks,

Nehru

Votes

Translate

Translate

Report

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