Copy link to clipboard
Copied
Does anyone know of a script that will export each section in an Indd doc to separate .indd files?
Thanks so much in advance!
Copy link to clipboard
Copied
I found a German one that does exactly that. It is absolutely perfect! it is in German, though. It's called DokumentAufsplitten. Can't remember where I found it. For it to work, you need to split your text flow just before the new section starts, otherwise it creates overmatter in the last text box. It will retain the pagination. Hope this helps.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I have roughly translated the scriptUI from German to English (using Google Translate, please feel free to refine the wording):
Copy link to clipboard
Copied
Thank you so much for doing that Stephen_A_Marsh. However the script returned this error for me:
Copy link to clipboard
Copied
Hi Andy,
best will be to contact the author of the script, Hans Haesler.
Provide the InDesign document you want to split using sections.
What option did you select?
Regards,
Uwe
Copy link to clipboard
Copied
Hi all,
Sorry for being late joining the conversation. The option I use is option 5, which extracts pages as separate files, not "detach side sections". Uwe, forgive me for the comment. After you've selected the fifth bullet, you will see another window, where you need to type in the page number as per this: 1-3, 4-7, etc.
What is very important is that you must stop the text flow at the end of page 3, as the newly created files will give show you a red plus sign at the last text box, i.e. the script doesn't deal with overmatter. It retains the page numbering, though. Just make the text contained in the page sections you want as separate files and it should work fine.
The window where you type in the section page numbers have things that you can tick. I believe the first one, the "bundübergreifenden Objekten teilen" gives you a _1 and _2 at the end of the filename of the sections.
I keep this scripts in the JavaScript folder.
Hope this helps,
S
Copy link to clipboard
Copied
siwybiwy wrote
… What is very important is that you must stop the text flow at the end of page 3, as the newly created files will give show you a red plus sign at the last text box, i.e. the script doesn't deal with overmatter. It retains the page numbering, though. Just make the text contained in the page sections you want as separate files and it should work fine. …
Hi siwybiwy ,
never thought that Hans' script is caring about threaded stories that should be cut to pieces.
This script was basically done with old DPS workflows in mind.
Now that you know this is an issue you could prepare your document before using a different script like Story Splitter by lf.corullon :
Re: Break threading but leave text in place
Before using this extensively read into the following replies where I found some cases where the script is not working as expected.
Regards,
Uwe
Copy link to clipboard
Copied
Hi Uwe,
I use it all the time with long text threads, ie multiple pages. And I use Story Splitter, too. They go really well together. The nature of my work requires that I split files into shorter chunks.
Thanks for all your replies, I follow what you have to say for years.
Copy link to clipboard
Copied
Do you have both scripts installed?
Your screenshot has the script name reported as “Export_Sections_as_INDD.jsx” where the edited file has the name “DokumentAufsplitten_516d_EN.js"
EDIT: I just removed the localised versions and tried the original script and it also errors on a different line in CC2018.
Copy link to clipboard
Copied
Hi Stephen,
what's your operating system?
I'm on Windows 10 German and see no issues with the script.
Tested with InDesign CC 2019 14.0.1.209.
I'm running the script from a subfolder of the Scripts panel's User folder.
Regards,
Uwe
Copy link to clipboard
Copied
A follow-up question:
If you are running the following code:
alert( app.locale );
what will be returned? For me it's GERMAN_LOCALE. For you it should be differently.
Maybe you have to change line 260 from:
else
if
(curLang == 1279477097) {
// englisch (oder andere)
to:
else
if
(curLang ==
1279477102) {
That means from Locale.INTERNATIONAL_ENGLISH_LOCALE to Locale.ENGLISH_LOCALE .
See a table of enumerators here to check what number will fit your locale value:
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Locale.html#d1e101653
Regards,
Uwe
Copy link to clipboard
Copied
Hi Uwe, thanks for following up.
I am on Mac OS 10.13.6 High Sierra, testing on both CS6 perpetual or CC2018.
Your locale snippet returns: INTERNATIONAL_ENGLISH_LOCALE
Scripts are installed and run from the User scripts folder.
Although I only intended to translate the scriptUI labels, I may have messed up the code without meaning to. That being said, both the original script and the localised script have errors. I have not yet documented the reported errors when the various script options are selected and run.
Copy link to clipboard
Copied
Hi Stephen,
I don't think you messed up the code.
At least the UI is showing up with my German version of InDesign.
Did a test with page color labels that ran ok.
Is the error showing right after starting the script or after using a particular option?
If using an option just tell which one.
Regards,
Uwe
Copy link to clipboard
Copied
The error is when selecting options on the second dialog window and then running, not on initial load/run.
I’ll run some tests and update this post...
EDIT: Egg on face, the test file did not match the selected criteria, the script works with the right file and options. However I did miss the translation of “Fertig” to “Finished”.