Creating an InDesign Document with multiple page sizes

Here’s my goal: Using Applescrippt and InDesign CS5, to create (in then end) a single document with multiple page sizes. Ie. page 1 would be 8-1/2 X 11, page 2 could be 11 X 17, page 3 would be 14 x 8-1/2, etc. After extensive looking I have found 3 ways to do this, just not with scripts.

  1. After adding a page, select the page size tools and either have predefined pages sizes or custom, change the page size. (Have NOT found a way to script this)
  2. Before adding a page, have a master page for each size in template document first, then add the pages and apply master pages. (This WORKS but only if have a template document first, I canNOT create multiple master pages with different size using applescript.) The reason this is a problem, the data that will be generating the InDesign document and pages there within are to numerous and random to have a “predefined” template file to call on.
  3. Create a document for each size page (this WORKS) but then I cannot find a way to move or merge the documents into one. Again, manually yes, but via script, no.

Some of the things I know: Document Preference effect the entire document. Page Preference and Bound are R/O (read/only) functions.

Any help would great, any questions let me know, I can give more details if needed.

Currently we are working with the automation done with multiple documents, we’d like to eliminate that and use only one. The initial documents are scripted.


You could just try a resize on the pages.

set SizeList to {{4, 6}, {7, 5}, {10, 8}}
tell application "Adobe InDesign CS5"
	tell the active document
		-- Resize the first whatever it is.
		tell page 1
			resize in pasteboard coordinates from {0, 0} by replacing current dimensions with ¬
				values {((item 1 of item 1 of SizeList) * 72), ((item 2 of item 1 of SizeList) * 72)}
		end tell
		make new page at end
		tell the last page
			resize in pasteboard coordinates from {0, 0} by replacing current dimensions with ¬
				values {((item 1 of item 2 of SizeList) * 72), ((item 2 of item 2 of SizeList) * 72)}
		end tell
		-- and so on.
	end tell
end tell

This should resize your first page. You will see I have ‘* 72’ for you inches as this method only accepts points.

Thank you!!!

I scoured the ID Dictionary, the web and even several books, NOTHING! Who knew, well you did, thanks again. :slight_smile: