Adobe CEP, or Common Extensibility Platform, provides a framework to extend Adobe applications like InDesign with custom user interfaces and functionality. There is a wealth of useful extensions available on Adobe’s Extension Marketplace.
The extension requires and supports Adobe InDesign versions 13–14, which relates to CC 2018-9. However, while the extension may run on older versions that hasn’t been tested in depth.
Read a general introduction to writing an Adobe CEP extension here, and a more in-depth documentation provides the CEP Extension Cookbook. For more information on the Bookalope API please refer to its documentation on Github.
InDesign does not load an extension unless the extension has been cryptographically signed. Therefore, in order to run the Bookalope extension from source, you need to switch InDesign to PlayerDebugMode:
- On Mac, open the file
~/Library/Preferences/com.adobe.CSXS.9.plistand add a row with key
PlayerDebugModeof type String and value
1. You can edit
.plistfiles using Xcode, PList Edit or other applications suited to edit Property Lists.
- On Windows, using its registry editor open the registry key
HKEY_CURRENT_USER/Software/Adobe/CSXS.9and add a key named
PlayerDebugModeof type String and value
reg add HKEY_CURRENT_USER\SOFTWARE\Adobe\CSXS.9 /t REG_SZ /v PlayerDebugMode /d 1 /fshould work from the command line prompt.
If you have multiple CSXS versions installed, add the
PlayerDebugMode to all of them.
For InDesign to find and load the Bookalope extension, copy the entire
extensions/Bookalope folder to:
- On Mac:
- On Windows:
Then start InDesign, and the extension should be available from the Window menu.
First of all, make sure that the extension’s
CSXS/manifest.xml contains valid XML; follow the instructions here. Note that the order of elements in
<Geometry> actually seems to matter!
Debugging the ExtendScript side of the extension doesn’t really work. However, I found it helpful to use the ExtendScript Toolkit, connect it to a running InDesign instance, and prototype the code there before using it for the Bookalope extension.
extensions/Bookalope/.debug configures a remote debugger which can connect to a running InDesign instance. Once the extension panel is open, navigate the Chrome web browser (or alternatively, the Adobe cef-client) to
localhost:8001 and enjoy…
To build the extension and generate an Adobe Zip Format Extension Package (
.zxp) use Adobe’s ZXPSignCmd tool. You also need a valid PKCS 12 certificate. If you don’t have one yet, you may generate one using e.g. OpenSSL or the ZXPSignCmd itself:
> # ZXPSignCmd -selfSignedCert <countryCode> <stateOrProvince> <organization> <commonName> <password> <outputPath.p12> [options] > ZXPSignCmd -selfSignedCert AU QL Bookalope Bookalope MyPa55w0rd bookalope-cep-cert.p12
Once you’ve created the certificate, package and sign the extension itself:
> # ZXPSignCmd -sign <inputDirectory> <outputZxp> <p12> <p12Password> [options] > ZXPSignCmd -sign ./extensions/Bookalope com.bookalope.zxp bookalope-cep-cert.p12 MyPa55w0rd -tsa https://timestamp.geotrust.com/tsa
> ExManCmd --list all # List all installed extensions > ExManCmd --install ./com.bookalope.zxp # Install the Bookalope extension
Then start InDesign, and the extension should be available from the panel list under the Window menu.
Once installed, open the extension panel:
To use the Bookalope web services, you need a Bookalope API key: you can find the key in the user profile of your Bookalope account. Then select a book manuscript in Word format (or any other of the supported document formats), fill in
Author of the book, and then click the
Upload and convert button.
The extension uploads the document to the Bookalope server for analysis and conversion. This can take a little while. Once finished, the extension downloads the converted file, creates a new InDesign document, and places the downloaded content into the new InDesign document. The extension’s panel changes now to this:
From here, you can open the document on the Bookalope website to revisit and adjust the entire analysis and conversion flow (watch the video tutorials on Youtube). You can also download the converted document in EPUB, MOBI, or print-ready PDF formats.
Writing an Adobe CEP extension requires documentation which is not always readily available. However, some useful resources are:
- The Adobe CEP resources on Github is here;
- The Adobe CEP extensions’s UI is styled using Adobe’s Spectrum CSS.
- The ExtendScript documentation is here;
- Davide Barranca’s blog contains useful tips;