Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Realign all text frames to fit into page master margins

Explorer ,
Jul 15, 2023 Jul 15, 2023

I would like to automatically command all of my text boxes to align to the page margins as set up in the page masters. My book has 750 pages, so I do not want to do this manually. See screesnshot. Thank you.

TOPICS
How to
399
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 17, 2023 Jul 17, 2023

Does anyone have any ideas?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 17, 2023 Jul 17, 2023

Were all of the text frames originally created using the Parent Pages? If that was the case—and it's just a matter of moving the frames back to their original location—then select all of the document pages in the Pages Panel and use the "Apply Parent to pages..." option in the Pages Panel pull-down menu. In the Apply Parent dialog that comes up choose the option to apply the appropriate Parent Page to all pages.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 17, 2023 Jul 17, 2023

That doesn't work for me. I've never found a good solution to the OP's problem, especially if any text frames have been resized. It seems to me there is one, but I can't recall how it works.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2023 Jul 18, 2023

My suggestion was based on the possibilty—as unlikely as it probably is—that the document had used a primary text frame and that the only alteration to that frame as it appeared on the document pages was that it had been moved from its original position on each page. In any other scenario applying the Parent page would revert the pages to the configuration of the original Parent Page.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2023 Jul 18, 2023

If it's one long story - without unlinked objects - you could delete all pages and reflow text again - or just create new document and reflow text there. 

 

Or... if you have ONLY your story on a dedicated layer - you could copy contents of the Story and reflow it on a new layer. 

 

Otherwise - script could do that for you. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2023 Jul 18, 2023

Hi @MarinusBarletius:

 

How did you get into this situation? Did you change the margins for the document after you already laid out the text?

 

There is a feature in InDesign called Adjust Layout that instructs the text frames to move with margin changes. If that's how you got here, I think you could simply restore the original margins without Adjust Layout enabled so that the frames again match the frame edges, and then update the margins a second time with Adjust Layout enabled. It's worth a shot.

https://helpx.adobe.com/indesign/using/adjust-layout.html

 

Barb

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2023 Jul 18, 2023

Hi @MarinusBarletius , Are text frames that are mis-aligned overridden master/parent page items that have been moved? An overriden masterpage item that has been repositioned will no longer respond to a position change from the master.

 

If that’s the case, a script could set the overriden text frames’ positions to match the parent page text frame’s position. Something like this:

 

 

 

var tf = app.activeDocument.textFrames.everyItem().getElements()
for (var i = 0; i < tf.length; i++){
    if (tf[i].overridden) {
        tf[i].geometricBounds = tf[i].overriddenMasterPageItem.geometricBounds
    } 
};   

 

 

 

Before and after running the script:

 

Screen Shot 13.pngScreen Shot 16.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 07, 2025 Mar 07, 2025

I tried this script, and nothing happened.

I saved this text of the script into a txt file with an .jsx extension, put it in scripts folder, and then opened scripts panel, saw it there, ran it. What am I doing wrong? I don't usually use scripts, but i have this same problem with some frames on parent pages not matching the margins.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2025 Mar 07, 2025
LATEST

@Kelli Jae Baeli

 

Do you use parent page items? 

 

Can you share your document - will be much quicker to diagnose the problem. 

 

If you prefer to do it privately - please click my nickname, but then you'll have to upload your INDD file somewhere first and then send me a link. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2025 Mar 07, 2025

If every page has one and only one text frame and you want that frame on each page to have the same dimentions and posiiton, then:

  • Create an Object Style to define the position and size of the frame,
  • Use Find/Change to apply the Object Style to all text frames. You can then adjust any unwanted frames affected, like titles and page number on the Parent page.

 

Here I created an Object Style that only defines the size and position for a frame…

Screenshot 2025-03-07 at 11.38.30 am.png

 

Then I used Find Change to search for any text frame with one column 9that way in can only affect text frames) and apply the “Primary text frame” Object Style.…

Screenshot 2025-03-07 at 11.39.21 am.png

 

Good luck

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines