Skip to main content
Participant
March 23, 2016
Answered

create a rectangle with a image inside

  • March 23, 2016
  • 1 reply
  • 1126 views

Hi all

Question of great starter... how create a rectangle with a image inside.

My project :

- Create a dialogue box where put the name of the picture.

- create the link between the picture to the active document (picture is in "Links" folder)

- do a rectangle in my document with a picture inside.

All the think is ok except the last stage (on a start, i was mind "that is the most easier"... but no).

Thank a lot, and sorry for my english.

This topic has been closed for replies.
Correct answer Vamitul

to add a rectangle:

var rect=doc.rectangles.add();

to place a picture inside it:

rect.place(FIle(image.path));

1 reply

tpk1982
Legend
March 24, 2016

Hi,

Adobe giving some free scripts you can use that. Name of script is ImageCatalog.jsx.

Thanks,

Karthi

Vamitul
VamitulCorrect answer
Legend
March 24, 2016

to add a rectangle:

var rect=doc.rectangles.add();

to place a picture inside it:

rect.place(FIle(image.path));

Known Participant
November 7, 2022

Simple and powerful, thank a lot.


Hi @Vamitul  

adding to same issue i have if we want to changes the bounds of the rectangle after place image

1-add a rectangle

2-place image

3-change the rectangle bounds (which result in cropping of image)

can we do this with script ?

Thanks in Advance!!