RoboHelp Script to Generate ePub format content for Mobile Devices

Friday, April 23 2010 @ 6:35 PM, By Ankur Jain

RoboHelp_Mobile_Output.jpgAs promised in my previous blog post, I’m happy to share a sample RoboHelp 8 script to generate ePub format output. Using this script, you can now take your RoboHelp/FrameMaker/Word content to mobile devices and eBook readers. Please refer to my previous blog post for more information and context on ePub, supported devices etc.

Here are the steps to follow to generate ePub output:

  1. Download the sample ePub Generator Script. Please note that you can customize/enhance this script further to suit your needs.
  2. Import the script to Robohelp 8. You can use Script Explorer (View>Pods>Script Explorer) in RoboHelp 8 to import the script.
  3. 7za.exe (file archiver) is required. For your ready reference, I’ve made a copy of this free utility available here. Unzip the file after you download it. You can also download it from web.
  4. Modify the script to reflect the location of 7za.exe on your machine (Example: var str7zipLocation = “C:\\RoboHelp\\ePubGenerator\\7za.exe”;).
  5. Open the RoboHelp project for which you want to generate ePub output.
  6. Select the ePubGenerator script and Run it. Specify the output path, and let the script generate .epub file for you.
  7. View the ePub output using ePub reader e.g. Adobe Digital Editions. You can also port this ePub file to your mobile device or eBook reader, or make it available for download on the web.

Now that we have the sample script to generate ePub format using RoboHelp 8, the next obvious question is what are the considerations and best practices from the authoring perspective; so here it goes:

  1. The size unit e.g. font size, margins etc. should be in ‘%’ for better reflow on different size of screen and for different users. This is applicable to CSS as well as XHTML files.
  2. The Table of Contents should not be empty.
  3. Please ensure all the style tag names in CSS are in lower case (e.g. H1 {..} or P.mystyle {..} should instead be h1 {..} or p.mystyle {..})
  4. All the DHTML effects and dropdowns should be removed. You can use Conditional Build Tags for this.
  5. There should not be any space in RoboHelp ‘Project name’ or ‘File name’.
  6. Set the ‘Handler name’ in ePub (XML) SSL settings in RoboHelp to “Export project to XHTML”.

If you plan to attend the STC Summit 2010 in Dallas, then please do attend the live demo of RoboHelp ePub output on multiple devices including iPhone, iPad, Motorola Droid (Android phone), and Barnes & Noble nook (eBook reader). We will demonstrate how to take your content in RoboHelp/FrameMaker/Word to mobile devices and eBook readers in my session “Develop and Optimize Content – Adobe RoboHelp beyond Help Systems” on May 3rd (5:00 – 6:15 PM). Hope to see you in Dallas!

Ankur Jain
Product Manager – RoboHelp

COMMENTS

  • By Kathleen - 11:51 PM on July 28, 2010  

    Ankur Jain,
    Just curious, did you have any problem with tables in the ePub format? For some reason, all of the text appears in paragraphs, but a table row appears empty before it. Just wondering if had any workarounds. Otherwise, this script is great! It needs some tweaking (paths side stuff), but I was so excited to see this! Thank you for posting.

    kathleen

    • By Ankur Jain - 8:09 AM on August 13, 2010  

      Kathleen,

      Many thanks for your comment. Glad you found this useful. Regarding the table row – it should work fine. Are you getting empty row in ADE or some ePub reader on the device? You may want to try it with some other reader and see if you still get an empty row. Like browsers, ePub readers drive some of these aspects. Please let me know your findings, and I will be happy to help.

      We’ll address Path and the other configuration (tweaking) in the next version of the script.

      Ankur

  • By Mark Antonation - 4:19 PM on August 5, 2010  

    I was able to successfully import your ePub Generator script and can use it to generate an .epub file from the sample projects that come with RoboHelp 8. However, when I run the script on my company’s existing help project, I get the message “TOC file missing” followed by the message “XML error in line 1 – Not well-formed (invalid token).” I compared all the files in the company help project to the files in the sample project and they seem to match up, so I am not sure where to continue troubleshooting. I’m hoping you will be able to point me in the right direction.

    • By Lisa - 7:55 PM on October 21, 2010  

      I’m having the same problem as Mark. Is there something I need to modify in the script (other than the location of the 7za.exe file)? I’m not all that technical, so any help I can get is greatly appreciated!

  • By John Robbins - 10:28 PM on August 19, 2010  

    Ankur, I’m unable to locate 7za.zzz using the link you provided. Can you send me another link?

  • By Nimish - 4:54 PM on September 17, 2010  

    Do the generated ePubs pass ePubcheck 1.0.5?

  • By Fred Brown - 6:16 PM on October 4, 2010  

    Ankur, any chance the ePub format script will work with RoboHelp 7? My company has not upgraded our software to RoboHelp 8 yet. Thanks.

    • By Ankur Jain - 6:16 AM on October 11, 2010  

      Fred, Scripting is one of the new features in RoboHelp 8. ePub script won’t work with RoboHelp 7. You need RoboHelp 8 to take advantage of the ePub script.

  • By Fred Brown - 6:51 PM on October 4, 2010  

    Ankur, One more question: Is there a place other than the STC web site where I can download the “Develop and Optimize Content” PDF file? The web site will not open for me. Thanks.

    • By Ankur Jain - 6:36 AM on October 11, 2010  

      Fred, the deck isn’t in the public domain. Please do email me if there is anything in particular you are looking for.

  • By Lisa Brown - 1:53 PM on October 19, 2010  

    Ankur,
    So glad I found your article on this topic! It’s EXACTLY what I’m looking for. I would also like a copy of your presentation you gave at STC – if you won’t post, would you consider emailing it to Fred and me separately?
    Are there any webinars/elearning courses scheduled for this topic? Thanks – Lisa

  • By Colin Pierce - 10:03 AM on October 28, 2010  

    Ankur, thanks for making this available. I’m having a problem – I’ve downloaded and installed the script and can run the script with my project open. I get the message that the transformation was successful but can’t find the .epub file anywhere. It’s not in the output location I specified and can’t find it by searching my computer. Any Ideas?

    • By Ankur Jain - 4:22 AM on November 1, 2010  

      Colin, thanks for your comment. You may want to check that you have 7za.exe set-up, and its path correctly defined in the script. If you are getting other files in the output folder but not the .epub file, then it is likely due to 7za part. Hope this helps.

  • By Leigh Steele - 5:13 PM on November 1, 2010  

    I am having the same problem as Colin Pierce. I cannot get the system to generate a .epub file for me. All I get are XML files in the ePub folder. I have 7za.exe on my machine and the script is pointing to the 7za.exe file.
    I am currently using RoboHelp 8 and do not have RoboHelp Server. Do I need RoboHelp Server to generate this file?

    • By Ankur Jain - 7:03 AM on November 2, 2010  

      Leigh, thanks for your comment. You don’t need RoboHelp Server to generate ePub output. I use 7za.exe (available for download here: https://acrobat.com/#d=ancuwyht6QkfpV4bS8O8Rw , rename 7za.zzz to 7za.exe) too. You may also want to check your XML SSL settings to ensure they are in line with the guidelines mentioned in the blog.

      I will email you another tempting option to try this out. Stay tuned!

  • By Leigh Steele - 1:26 PM on November 2, 2010  

    I tried your suggestions, but I still could not get an ePub file to generate. I did download 7za from the link and ensure that the path was correct in the script. I also checked the handler name in both the epub.ssl script and the XML Output.ssl script and both were pointed at XHTML (m_strHandlerMoniker” value=”Xhtml.hdf|Export Project to XHTML)
    I reviewed the Output file, and the Generate process still only makes the XHTML and XML files, and then stops as if it is done.
    I did notice that I have spaces in the name of my project’s xpj file and the file in which it is based. Could this be affecting it? The published are configured to not have spaces. The original project file probably has nothing to do with the epub script, but I’m grasping at straws here trying to determine why this is not working for me.
    Thanks for your help so far!

  • By David Hutchinson - 3:50 PM on January 27, 2011  

    I had the same problem. I fixed it my making sure the path has two back ‘\\’ when you would use one ‘\’ in Windows. So “C:\Program Files\7-Zip\7za.exe” must be “C:\\Program Files\\7-Zip\\7za.exe” in the script file.

  • By Ben - 4:11 AM on February 16, 2011  

    I’m getting the TOC file missing” followed by the message “XML error in line 1 – Not well-formed (invalid token) error message trying to generate an epub with the script.
    Could you possibly dumb down an explanation for how to fix this problem. The explanations I’ve read might as will be in Martian to me.

  • By Roger Shuttleworth - 12:36 PM on June 23, 2011  

    The link to the script (in step 1) does not work. No response. Is there an alternative location for the script?

    • By Ankur Jain - 7:18 AM on August 1, 2011  

      Roger, I am able to download the script using the URL in step 1. Can you please give it another try and let me know?

  • By Shéba - 1:36 AM on July 20, 2011  

    Hi Ankur,

    When do you think Adobe will release a plug-in or update to help RoboHelp 9 users generate an Epub format that had embedded video/audio?
    I know InDesign can do it but if I use RoboHelp as my Authoring tool, I am not sure why the Epub output is different to the Indesign one and can’t have video embedded in the page?

    • By Ankur Jain - 7:17 AM on August 1, 2011  

      Sheba, we have been working on this, and I am pleased to let you know that RoboHelp 9 can now produce ePub with embedded videos too. We are yet to release the video support in ePub though. Would you be willing to beta test it?

  • By Ahmed - 8:59 PM on October 12, 2011  

    is epub supports arabic?

  • By Tracey Stokely - 5:23 PM on October 24, 2011  

    Ankur,

    When I run the ePub Generator script with my RH 8 project, I’m getting an error on the following line:
    project =3D RoboHelp.getCurrentProject();

    Any ideas of what I’m doing wrong?

  • By Anant - 6:08 AM on June 7, 2012  

    Hi,

    Like reverse engineering CHM files, please let me know if there is a tool/script available that helps reverse engineering of ePub files as well.

    With regards,
    Anant

    • By Ankur Jain - 6:07 AM on July 3, 2012  

      Anant, you may want to run EPUB validator (e.g. ePubCheck) on the EPUB output and/or unzip the .epub. Hope this helps.

      Ankur

  • By Smita - 4:40 AM on June 27, 2012  

    Hi Ankur,
    Will this work for Robohelp7? If not then is there any other script/utility which you could vouch for Robohelp7 files conversion into mobile/ebook acceptable format.

    • By Ankur Jain - 6:03 AM on July 3, 2012  

      Hi Smita,

      I’m afraid this won’t work for RoboHelp 7, and I can’t vouch for any other utility. I would recommend upgrading to the latest version of RoboHelp.

      Let me know how it goes.

      Ankur

  • Categories

  • Archives

  • Authors

  • Useful Links

  • Recent Comments

    • Dieter Gust: Very nice several goodies in addition to bugfixes!! I like that very much! Dieter
    • Don Bridges: I expect privacy concerns will tamper IoT for our homes and consumers, but for business it will usher a...
    • Lois Patterson: I’m always happy to see math support, although I’m not currently using FrameMaker. I have...
    • Olga: I know it’s a really old post but I was unable to find any information online. I need to number the...
    • click: yes. http://wwwimages.adobe.com/www .adobe.com/content/dam/Adobe/e n/volume-licensing/pdfs/avl...