Skip to main content
Participant
June 12, 2023
Answered

InDesign Script to create custom sized pages from data

  • June 12, 2023
  • 1 reply
  • 1489 views

Hi there,

Looking for some help writing a script for use in InDesign. I have very little knowledge on how to write a script for InDesign but love using them! So any help would be AWESOME!

 

Problem:

We receive Excel sheets from Media companies containing a list of sizes (i.e for billboards - 576x28,600x920,750x360...) to be created. Currently I create an InDesign document, add pages and manually change each page size to suite the list, create the layouts and output files.

To make exporting faster I use a script called ‘Export-named-pages’. “The script determines file names for each page from the content, and exports images or PDFs. The result is uniquely named files of each page.”

 

Script Solution:

I’m after a script for InDesign (currently running 18.3) that will either create a document with custom sized pages from the supplied data - OR - change a pages size depending on the information supplied. Potentially from an excel sheet with a column of sizes WxH - OR - from text on a page in InDesign (after a quick data merge of sizes from supplied data).

 

Hopefully I have explained my self well enough 😐

 

Thanks in advance for any help!

This topic has been closed for replies.
Correct answer Nouku77

It should be pretty straightforward. You can search the forum for samples to read a file as well. Try to play around, you will learn something, if you get stuck let us know what you came up with and we shall try to help you.

-Manan 


Well... I ended up in the weeds chasing my tail.... BUT William Campbell had a script ready to go. See below.
https://www.marspremedia.com/software/indesign/pages-from-csv

1 reply

Community Expert
June 13, 2023

Have a look at the following discussions

https://community.adobe.com/t5/indesign-discussions/is-it-possible-to-change-the-page-size-of-a-page-in-indesign-using-extend-script/m-p/13584839#M515942

https://community.adobe.com/t5/indesign-discussions/js-how-to-set-page-size/m-p/8725595#M31862

The first script shows how to change the size for a single page and the second one shows how to do it for all the pages in the document except parent pages.

-Manan

-Manan
Nouku77Author
Participant
June 13, 2023

Thanks for the info Manan. I'll take a look. Hopefully I can make sense of it all 🙂

Community Expert
June 14, 2023

It should be pretty straightforward. You can search the forum for samples to read a file as well. Try to play around, you will learn something, if you get stuck let us know what you came up with and we shall try to help you.

-Manan 

-Manan