How do I use AI to create an EasyCatalog pagination script?
Requirements: EasyCatalog 22.1.0 or later, with both the optional Pagination and Scripting modules installed.
Prepare a template with tested formatting rules, arrange your data in publication order, then export a Composition and Scripting Manifest. The manifest tells the AI agent which data, rules and features it can use. Your instructions tell it how to lay out the selected items.
Where can I find sample scripts?
EasyCatalog includes sample scripts created by AI. To install them, open Window → Utilities → Scripts in InDesign. From the Scripts panel menu, choose Install/Update EasyCatalog Sample Scripts. Expand EasyCatalog Sample Scripts in the panel and look in the Pagination and Composition Plans folders. If a sample produces a layout close to yours, you can give the script to your AI agent alongside your manifest.
1. Prepare the template and test your formatting rules
Create an InDesign template with the page size, margins, columns and parent pages your publication needs. Create and name the formatting rules you want the script to place. Test each rule with the data it will receive. For a rule that applies to a group, test it with a group selected. For a rule that applies to an individual record, test it with a record selected.
Check that the expected fields appear and that the populated items fit the intended space. Include records with longer text or missing content so you can see how the rules behave. Save the template once the rules are working.
2. Arrange the data in publication order
Load your data into the EasyCatalog Data View panel. Set the sort order and apply any grouping the publication requires. Expand the groups and read down the panel. The groups and the records within them should appear in the order you want them to appear in the document.
3. Select groups or records and export the manifest
- With your template document open and active, go to the EasyCatalog Data View panel.
- Select a few representative groups or records. For grouped data, select the groups themselves so the selection includes the records beneath them. For ungrouped data, select individual records.
- Open the Data View panel menu and choose Reports → Composition and Scripting Manifest…
- Save the file as
Composition and Scripting Manifest.json.
The manifest describes your selection, its fields and grouping, the formatting rules available in the active document, and the composition features supported by your installation. Export a fresh manifest if you change the rules, grouping or selection the agent needs to work with.
4. Give the manifest and layout instructions to the AI agent
Attach the manifest to your request and ask for a complete InDesign ExtendScript (.jsx) that paginates the selected EasyCatalog data into a copy of your template. Use the exact formatting-rule names from the document. Describe the layout decisions the agent needs to make:
- Which rule should be placed once per group, and which should repeat for each record?
- Where should pagination start, in what order should items fill the page, and how much space should separate them?
- Which items must stay together? What should happen when the next item will not fit?
- Where should a new group begin, and what should repeat when a group continues onto another page?
If you have a finished page or a sketch, attach it as a visual reference. Include written instructions for column breaks and page breaks, since a single page may not show what should happen next.
5. Test the script in InDesign
If the AI agent can access InDesign, ask it to run the script on a fresh copy of your template and inspect the resulting pages. Select enough data to reach a page break. If the data is grouped, include at least two groups so the agent can also check what happens when one group ends and the next begins. Ask it to correct any problems and rerun the script on a fresh copy.
If the agent cannot access InDesign, save the generated .jsx file in your Scripts Panel folder. Open a copy of the template, select your test groups or records in the EasyCatalog Data View panel, then double-click the script in InDesign’s Scripts panel.
6. Check the output and refine the script
Compare the pages with the selection in the Data View panel. Check that each item appears the expected number of times, uses the correct formatting rule and follows the intended order. At each column or page break, check the last record before the break and the first record after it. This makes skipped or repeated records easier to spot.
If something needs changing, tell the agent where it happened, what the script did and what you expected. Include a screenshot for a layout issue, or the exact error message and line number if InDesign reports a script error. Once the test selection paginates correctly, try a larger selection and keep the tested script with the template and formatting rules it uses.