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 22, 2023

No problem through scripting - are you on PC or Mac? 

 

Eric Dumas
Community Expert
Community Expert
October 22, 2023