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

how script arrenge image in indesign?

Community Beginner ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

I have a number of fixed-width and variable-length images
Now I want to put these images together in page indesign.(Like newspaper ads.)
Where is the problem this script?

this script Overlapping all image.

var myDocument=app.activeDocument;

var myPages=myDocument.pages;

for(p=0;p<myPages.length;p++)

{

        var myGraphics=myPages

.allGraphics;

        var myPageWidth=myDocument.documentPreferences.pageWidth;

      

            var myX2, myX1, myY1, myY2;

            for(j=0;j<myGraphics.length;j++)

            {

                if(myPages

.side == PageSideOptions.leftHand)

                {

                    myX2 = myPages

.marginPreferences.left;

                    myX1 = myPages

.marginPreferences.right;

                }

                else

                {

                    myX1 = myPages

.marginPreferences.left;

                    myX2 = myPages

.marginPreferences.right;

                }

                myY1 = myPages

.marginPreferences.top;

                myX2 = myPageWidth - myX2;   

                var myImageheight=myGraphics.parent.geometricBounds[2]-myGraphics.parent.geometricBounds[0];

                myY2=myY1+myImageheight;

                                   var mygraphicmove= myGraphics.parent.duplicate([myY1,myX1]);             

                                   myGraphics.parent.remove();

                                   mygraphicmove.textWrapPreferences.textWrapMode = TextWrapModes.BOUNDING_BOX_TEXT_WRAP;

          

       }

}

TOPICS
Scripting

Views

692

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 ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

how to post in the correct forum?

(Ans.: click here -> 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
Community Beginner ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

I do not understand.

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 Expert ,
Feb 04, 2018 Feb 04, 2018

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
Community Beginner ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

i not understand.

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
Guide ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

Translate:

translate.png

or here:

uebersetzer.png

Fenja

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
Mentor ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

shahriara7551080  napisaÅ‚(-a)

....

Where is the problem this script?

....

Problem is that your script use to do something like:

for each page move all graphic frames to top-left or top-right corner of page body

And your script has not even idea what is your goal.

So am I, to tell you the true...

Jarek

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 Expert ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

Hi Jarek,

I have no idea—or at least I have a faint idea—what should be done.

A couple of images on a page should be arranged so that:

The images would fill the page without big gaps?

It's not clear if there is a layout grid (columns, guides and margins) where the images should fit in.

It would be best, if shahriara7551080 would provide some screenshots with a before state and an after state when the script has run. Frame edges showing, guides showing, baseline grid showing.

Regards,
Uwe

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 Expert ,
Feb 05, 2018 Feb 05, 2018

Copy link to clipboard

Copied

LATEST

(Am I the only one expecting an "I not understand" here ...)

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