Copy link to clipboard
Copied
Text frames for some reason are unlinked to my master page. When I adjust the master page text frame nothing changes on the page text franes.
I forgot to centre the text frame on the master page, now all the text frames on every page are slighlty off centre.
I can centre it with the following:
Select the object style: general option: Fixed width, set the width to 24p
Then window object and layout, align centre.
Problem is I need to do this for over 100 pages.
Is there a way to centre all the text frames with a given object style?
(not vertical justification) horizontally to the margins of the respective page or a way to relink them to the master page text frame and then centre the text box on master page?
Copy link to clipboard
Copied
Hi @Theo331728749dq2 , can you attach a copy of the document to a reply?
Copy link to clipboard
Copied
This script - posted by @rob day - should help you:
or at least be a good start.
Of course, if you are on Windows you could always use my tool:
Copy link to clipboard
Copied
Basically, my text frame is at the correct position at the right hand side but the width needs to be increased on the left hand side by about 2-3mm
I get the following error with the script in the link:
Error 30614
Error string: invalid object for this request
Line 2
Copy link to clipboard
Copied
I don't think my script in the other thread would work for what you are describing. Can you attach your ID file?
Copy link to clipboard
Copied
The following shifts all the text frames left:
app.documents[0].pages.everyItem().textFrames.everyItem().
move
(
// to parameter:
undefined ,
[
"-0.035in" ,
"0"
]
);
But then it’s imposible to know whether all the frames are centred, because I had edited some of the text frames,so I’m trying to figure out how to horizontally “centre” all the text frames. This might be a better option.
Copy link to clipboard
Copied
It's a good start - you just need to process this "collection" of objects one-by-one in a loop - that's why I've suggested rob's script - as a template.
Sorry, I'm not JS guy so can't serve you full working code - just offer ideas / algorithms.