0

I'm looking to batch import some data into Indesign via XML and I've set up an item template. As there are an unknown amount of items in the XML Indesign I'd like Indesign to create a new page and duplicate the item template with all the elements inside it.

I've successfully tagged all the elements in Indesign, and when I import XML only the first item is used to populate the elements, no duplication occurs.

How do I automatically duplicate the item template on to a new page? If this isn't possible how else can I import the data into Indesign to automatically duplicate the elements?

user3791372
  • 4,445
  • 6
  • 44
  • 78

1 Answers1

0

To import repeated elements you need to change XML Import options. This is a checkbox with value "Clone repeated text elements" in XML Options dialogue, which pop ups when you import manually. To do this programmatically, assuming you are using ExtendScript, try this before the XML import (based on InDesign Scripting Guide):

var myDocument= app.activeDocument;

var myXMLImportPreferences = myDocument.xmlImportPreferences;

myXMLImportPreferences.repeatTextElements = true;

Sorry, not a full answer, as this does not explain generating a new page based on the number of elements.

I usually place items on the page and check for overflow, which gives me an indication if another page needs to be added.

Nicolai Kant
  • 1,391
  • 1
  • 9
  • 23