For context – link to the original thread: InDesign crashing during export to Reflowable Epub
And how I found solution.
First thought – there must be something wrong with something – some text, Endnote, object on the pages, etc. – some kind of corruption.
So I’ve tried to export just 1st page – without any Endnotes – went smoothly – and that confirmmed my suspicions.
Now – what to do?
How to find source of corruption? There is an option to “split document” by specific Paragraph Style:

But it failed as well…
So, let’s split whole document into separate PAGES – and then try to export them one-by-one.
Of course, separating each page – manually – wouldn’t be very efficient 🙂 so, let’s create a Task that will do that for us – split whole document into separate single-page documents.
But first, we need to load Document’s structure:

Then, right-click on the header of the TYPE column – with SHIFT:

Keeping pressed SHIFT key when right-clicking on the header means “hide everything else but the selected item” – otherwise, user would need to either click “! NONE” then “Page” or uncheck one-by-one every other option on the list.
And that gives us – just Pages:

Next step – right-click on the header of the 1st column and “! Select Visible”:

Now we can load our first Task:

It needs to be run in BatchMode – either forward or backwards – in this case it doesn’t really matter – and it will:
- Goto Page – based on the page on the list,
- Move Page – this is a compound rule – in this case – it will automatically create a new / blank document and move page selected in the 1st step to the beginning of this newly created document,
- As, by default, blank documents will have 1 page anyway, with “undetermined” size – this step goes to the last page in this new document – “-1” argument – and selects this page, Also, becuase those are Endnotes – depends on the settings – InDesign might create additional page(s) to reflow contents of the Endnote(s).
- This step deletes this empty page,
- Saves and Closes our new document with moved page.
After highlighing its name – user needs to click FORWARD button – or the next one, BACKWARD:

After a while – there will be bunch of INDD files in the folder:

The 2nd step in this Task – Move Pages – automatically uses original name of the file and adds PageIndex at the end of the name.
So far so good.
Now, we need another Task – that will export every INDD file as a separate ePUB file – but first, we need to load our documents:

So the steps it performs are:
- will switch to Documents list – for our convenience – EVERY operation that can be performed in ID-Tasker – can also be executed as a rule in the Task,
- will load all INDD files from specified folder,
- will filter documents that has been loaded to show only those that have “_” in the name – in this case it’s enough,
- will automatically mark all remaining results on the list – for our convenience – same comment apply as per 1st step.
This Task needs to be tun using PLAY button:

And the result will be:

Now, we can load 3rd Task:

Steps it will perform on each document – when run in BatchMode:
- IDT will automatically load document from the list – that is Visible AND marked in the 1st column – will export this open document as reflowable ePUB,
- this step is no longer relevant – it was supposed to prevent the whole process from crashing / hanging – but it looks like when InDesign hangs on the export – it stops responding and IDT waits for it to end – but never gets the response – so this will need to be solved differently – either as a separate WatchDog application or by adding a Timer and background monitoring event – so for now, the exporting process needs to be monitored,
- this will close the document – in this case without saving – 4th parameter (columns headers are always updated for the selected rule / step – and as 1st rule is selected – columns headers relate to this 1st rule)
After running this 3rd Task in BatchMode – fwd / back doesn’t matter – we would be getting – almost – something this:

As per the thread, it turned out that the culprit was a WWW address in the 30th Endnote on page “8” – so user needs to monitor the whole process and for now – manually kill InDesign and then restart the process after failed page – to check for more problems.
Re-hyperlinking this address didn’t help – only complete un-hyperlinking – deleting associated hyperlink on the Hyperlinks pallet and living as a plain text was the solution.
Download “Finding what’s wrong with failing ePUB export” ePUB_Export_Problem_01.zip – Downloaded 679 times – 797.00 B