Copy link to clipboard
Copied
I've been trying to work out how to set the ePub Export Option "Split document: Based on Paragraph Style Export Tags" using javascript. It doesn't appear to be part of epubExportPreferences, as
myDocument.epubExportPreferences.breakDocument = true;
Sets the document to break on [Basic Paragraph]. I can change it to another single paragraph easily enough, but that isn't what I need.
I'm probably just looking in the wrong place, But if anyone could point me in the right direction I would be very grateful.
My code is here (which does work, but doesn't set this option): https://github.com/makeBetterEBooks/eprdctn/blob/master/DBW_ePubExport.jsx
Thanks!
I found the answer a while ago, but thought I would post it here for anyone else looking.
You have to set the paragraph style name to an empty string:
myDocument.epubExportPreferences.breakDocument = true;
myDocument.epubExportPreferences.paragraphStyleName = "";
Then it will break on the export tags.
Copy link to clipboard
Copied
Check out http://jongware.mit.edu/idcs6js/pc_StyleExportTagMap.html -- this sets per-style options for ePub exports.
Copy link to clipboard
Copied
Thanks Jongware, you have created an awesome resource that I frequently use, but I'm not having problems with styleExportTagMaps. Take a look at the code I linked to for an example of how I hope to use it.
I specifically want to tell the ePub Export Options dialog to use the break mapping specified in that object. It's the very first option of the "Advanced" panel:
Copy link to clipboard
Copied
Ah right. Did you set (some of) your paragraph styles to break on? It's a Per-Paragraph setting, so that's why I pointed you to ExportTagMaps.
(It's kind of weird that it breaks on Basic Paragraph Style by default. It's not even in that list!)
Copy link to clipboard
Copied
Yes, in the sample above it's set to break on 02 Part Title and 02 Chapter Title.
I can't get it to replicate choosing [Basic Paragraph], so I might have just tried something really weird with the iteration of the script that gave me that.
In other news: you can chose to break a document on [Basic Paragraph] but only via script, not through the UI even if [Basic Paragraph] is used in the document.
Copy link to clipboard
Copied
It looks like Adobe forgot to update this option. It's the same property as in CS5.5, so it seems *not* updated to make use of the new possibilities in CS6.
Copy link to clipboard
Copied
Thanks for confirming. I've been digging around for a long time.
I'll put in an official request to get it added to the next version of InDesign
Copy link to clipboard
Copied
I found the answer a while ago, but thought I would post it here for anyone else looking.
You have to set the paragraph style name to an empty string:
myDocument.epubExportPreferences.breakDocument = true;
myDocument.epubExportPreferences.paragraphStyleName = "";
Then it will break on the export tags.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now