How to center content in rectangle in Indesign?

Hi!

(again)

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

Thank you!

Christian

Hi

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

Thank you a lot Pidge!

but the rectangle still doesn’t contain a graphic → i want, that a pdf what later will be drag’n droped into it will be centered.

Thanks,

Christian

I’m not seeing that that is possible without using AppleScript. Are you able to do this manually?

Sorry I’m Confused what you actually want!

Hi Pidge!

oh my english! Sorry!

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?

Thank you,

Christian

Hello!

i made 3 screenshots of this funtion in Indesign. So far as I know, this function is new to CS3.

IMG-Tag doesn’t work for me …

Right-Mouse-Click
Option-Windows for upper left corner alignment
Option-Windows Settings for centered content - so as i need!

Thank you … sorry for the german-localized Indesign …

Christian

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

Hey Matt-Boy! Thank you!

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.

(it is for an imposing automation)

Thank you,

Christian

Hi Kris

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

Matt-Boy and Pidge!

Thank you a lot!

Christian