0

I have a routine which reads an XML file and builds an ID document. How do I create a page break by adding to the current insertionPoint? I tried it with

story.insertionPoints.lastItem().contents += SpecialCharacters.pageBreak;

but those special characters seem to apply only to XML. What is the alternative? - I'm using ID CS5.

Alex Monthy
  • 1,827
  • 1
  • 14
  • 24

2 Answers2

2

I got the answer elsewhere. The trick is to use the assignment instead of the concatenation operator:

story.insertionPoints.lastItem().contents = SpecialCharacters.pageBreak;
Alex Monthy
  • 1,827
  • 1
  • 14
  • 24
0

Looking at the InDesign JS API documentation, it's actually:

story.insertionPoints.lastItem().contents = SpecialCharacters.PAGE_BREAK;
Rudi
  • 61
  • 1
  • 9