Copy link to clipboard
Copied
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.
to add a rectangle:
var rect=doc.rectangles.add();
to place a picture inside it:
rect.place(FIle(image.path));
Copy link to clipboard
Copied
Hi,
Adobe giving some free scripts you can use that. Name of script is ImageCatalog.jsx.
Thanks,
Karthi
Copy link to clipboard
Copied
to add a rectangle:
var rect=doc.rectangles.add();
to place a picture inside it:
rect.place(FIle(image.path));
Copy link to clipboard
Copied
Simple and powerful, thank a lot.
Copy link to clipboard
Copied
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!!
Copy link to clipboard
Copied
You can set the geometricBounds of the rectangle. It is an array of numbers in the format [y1, x1, y2, x2]. You might want to also look at setting the measurement units before making the change, if you want to set the values in a unit other than points
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#MeasurementUnits.html#d1e78257
-Manan