Skip to main content
Participant
September 10, 2011
Question

[JS][CS5] How do I place into a rectangle derived from a Master?

  • September 10, 2011
  • 1 reply
  • 741 views

The subject says it. I want to place an image onto a page into a rectangle defined on the page's master. How do I reference the rectangle? (Javascript, ExtendScript, ID CS5).

Apologies if this is a beginner's question, and thanks in advance for any help.

  - susan

This topic has been closed for replies.

1 reply

Inspiring
September 11, 2011

Hi Susan,

In this code the reference to each of the objects was as it is the first one [0].

Alternatively you can refer to the  page or master's rectangle by its name.

var oDoc = app.activeDocument; oPage = oDoc.pages[0] oRec=oPage.masterPageItems[0].override(oPage) oRec.place("C:\\images\\123.jpg") oRec.fit(FitOptions.PROPORTIONALLY)

Regards,

Eli

susan41Author
Participant
September 11, 2011

Thanks, Eli. That looks like it should do it.

  - susan