How can i center the content of a rectangle in Indesign CS3 (Apple-Shift-E) via properties of this rectangle (there are a right-mouse option for too).
What do i have to add? I searched and searched - but didn’t find anything about in the reference …
Example to be completed:
tell application "Adobe InDesign CS3"
tell page 1 of document 1
make new text frame with properties {geometric bounds:{pdffield_y, pdffield_x, pdffield_y + hoehe, pdffield_x + breite}, label:pdffield_label}
end tell
end tell
to center an image something like this should work:
tell application "Adobe InDesign CS3"
tell document 1
tell rectangle 1
tell graphic 1
fit EPS given center content
end tell
end tell
end tell
end tell
if your centering text:
tell application "Adobe InDesign CS3"
tell document 1
tell page 1
make new text frame with properties {geometric bounds:{10, 10, 50, 50}, label:"", contents:"KrisKros"}
tell text frame 1
tell paragraphs to set justification to center justified
end tell
end tell
end tell
end tell
all this stuff is in the indesign applescript dictionary it just takes a bit of digging around.
good luck
There is an option in Indesign CS3 to set the alignment of the in-the-future-putted-in PDFs. Basicly they align to the upper left corner. But i want absolut centering. Should I post a screenshot about this window?
Ahhh. Now I see. I didn’t realize you could do that.
It took a little work but I figured it out:
tell application "Adobe InDesign CS3"
tell document 1
tell rectangle 1
set fitting alignment of frame fitting options to center anchor
end tell
end tell
end tell
Would it possible to put this into the properties of an rectangle while creating it?
Or set it to all rectangles of an document together.
Or to set it to default before creating all of the maniy rectangels i create in my document.
This seems to get all rectangles with in a document.
tell application "Adobe InDesign CS3"
tell document 1
tell every rectangle
set fitting alignment of frame fitting options to center anchor
end tell
end tell
end tell