Copy link to clipboard
Copied
Dear all,
I currently working on a script to automatically import a manuscript from a Word file, and then properly format it for PDF and EPUB. Currently, the manuscript is being placed into one autoflowing override of the master text frame, with the chapter headings and subheadings neatly formatted using paragraph styles and separated using page breaks. However, I would like to split this into multiple text frames at the chapter headings, one for each chapter, and ideally still have them autoflow to fit the text.
Now, from a theoretical point of view, I get the idea that this shouldn't be too hard, seeing as the 'breaking points' are already clearly demarcated by the chapter headings and their associated paragraph styles. However, up until now I've mainly worked with one large text frame, so I'm at a bit of a loss about where to start here. Any help would be immensely appreciated!
Best regards and thanks a bunch in advance,
Julian
Copy link to clipboard
Copied
Do you know, that you can split your document on paragraph style level, if you click the checkbox in the tagsexport tab of the paragraph style?
So I would recommend, not to split in InDesign, instead split it during the export for PDF or EPUB.
–Kai
Copy link to clipboard
Copied
Dear Kai,
thank you so much for your answer. I do indeed know that option exists, but I am not looking to create multiple files, merely multiple text frames within the same document. This is because I would want individual chapters to be formatted somewhat differently, including the transparency of the text frame background fill.
Copy link to clipboard
Copied
So I've managed to find the pages where the chapter headers are (var myChapterStart) in a loop, as well as the corresponding text frame on it (var myCurrentTextFrame). I can make a new page with overridden master text frame before every chapter header, but I'm a bit lost as to what the most efficient way to transfer the rest of the text into that frame (and repeat for all other chapters). My attempts so far basically all lead to the application crashing - any help would again be greatly appreciated!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now