Skip to main content
Inspiring
October 22, 2023
Answered

How to make a single page in indesign that is auto-adjustable based on the content

  • October 22, 2023
  • 2 replies
  • 1146 views

Hello everyone, sorry if this has already been answered before.
I am trying to make a single page in indesign that is auto-adjustable based on the content.  The content has a header, a footer, and a content area.  Depending on the content, I want the page to auto adjust its size.  Sometimes the content can be 10 lines, sometimes 50 lines and sometimes 500 lines.  In all cases, the page should remain single and auto adjust itself.  TIA.

This topic has been closed for replies.
Correct answer Robert at ID-Tasker

Just sent - thanks!


Quick and dirty:

 

'############
' script start
' (C) www.adobescripts.com
'############
set myInDi = CreateObject("InDesign.Application")
set myDoc = myInDi.ActiveDocument
set mySel = myInDi.Selection.Item(1)

call mySel.Fit(1718906723)
myDoc.DocumentPreferences.PageHeight = mySel.GeometricBounds(2) - mySel.GeometricBounds(0)
myDoc.Pages.Item(1).AppliedMaster = myDoc.MasterSpreads.Item(1)
mySel.GeometricBounds = myDoc.Pages.Item(1).Bounds
'############
' script end
'############

 

One condition - no error checking so "main" TextFrame needs to be pre-selected.

 

2 replies

Frans v.d. Geest
Community Expert
Community Expert
October 22, 2023

An auto adjustable page is not possible in InDesign.

Inspiring
October 22, 2023

Is it possible in PDF or any other Adobe products?  Thanks.

Robert at ID-Tasker
Legend
October 23, 2023

We are working on this doc and have [almost!] finished header and footer.  I attach the exported PDF so you can see where the content will go in.  Its OK to manually copy the content in since we will send out the newsletter only periodically.


If you have header + body + footer, then it would be easiest, if you can have it as one TextFrame - not sure if Table could handle it... 

 

So, initially, contents of your TextFrame would be three paragraphs:

1) header - placed as a group of objects - InLine. 

2) empty - you'll copy your "body" here, 

3) footer - same as header. 

 

This would make script EXTREMELY simple. 

 

Eric Dumas
Community Expert
Community Expert
October 22, 2023