0

I am an ePUB book developer who uses Adobe InDesign CC2015 on Windows 10. Once I complete my edits, I have to export the contents from InDesign to a .epub file and preview it for accuracy. The InDesign export window has an option to configure 1 or more ePUB readers to preview the epub. When a reader is set up in this export window, it’s supposed to have a .exe file extension. One of the readers I like to use is a Google Chrome extension called Readium. Since this runs inside of Chrome, there is no direct way to tell InDesign how to access this, but I did figure out a work-around by making a batch file which I called readium.bat. I did this by creating a desktop shortcut for Readium. Then I opened the properties for the shortcut, copied the contents of the Target field and pasted it into my batch:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory=Default --app-id=fepbnnnkkadjhjahcafoaglimekefifl

I went back to InDesign Export window and pasted the batch file name, along with its directory path (see screenshot).

InDesign Export Window screenshot When I export, Readium does launch, but it doesn’t load the ePUB file. I have to do that manually. Does anyone know if it’s possible to get my batch file to load the epub into Readium all in one go automatically?

CP Creative Studio
  • 125
  • 1
  • 2
  • 8

1 Answers1

0

Verify that readium.bat file contain this:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory=Default --app-id=fepbnnnkkadjhjahcafoaglimekefifl "%~1"

(You need "%~1" to pass file name to chrome and chrome app.) Test from cmd.exe doing readium.bat "yourpath\test.epub"

Chrome.exe does support passing command line arguments to chrome apps. Chrome app must be written by it's developer to support command line arguments (SO#19227472).

Test your command in cmd.exe do a cd to C:\ put your file in C:\ and call it test.epub. Test command "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory=Default --app-id=fepbnnnkkadjhjahcafoaglimekefifl test.epub. Repeat if that fails with out ".epub" extension. This will check if readium chrome app supports command line arguments.

If tests have failed contact Redium developer and verify if they support argument passing to their app.

Community
  • 1
  • 1
Skip R
  • 383
  • 3
  • 14
  • My batch file didn't have the "%~1". I added it like you have written, but it didn't open the epub file in the reader. What exactly does "%~1" do? I tried testing readium.bat "yourpath\test.epub". It only opens the reader, but it doesn't open the epub in the reader. – CP Creative Studio Apr 02 '16 at 17:22
  • @Soundman I have added further information above to answer that. – Skip R Apr 02 '16 at 22:10
  • So, I did write to Readium support to inquire if their app supports the passing of arguments back in early April and never got a response until now. Here's a direct quote from the email I received: At this point we do NOT support arguments. Let me look into this and file an issue. I will send you a link to the issue when it is filed. Thanks Ric Wright Director of Engineering Readium Foundation – CP Creative Studio May 31 '16 at 17:09
  • You could look into feasibility of creating a script using tools like https://en.m.wikipedia.org/wiki/AutoHotkey to simulate manually passing file using keystrokes if they are not going to support arguments in near futire – Skip R Jul 10 '16 at 02:28