Optimize an Existing eBook for PeBL

Already have an ebook that you want to convert into a PeBL book? The process is fairly straightforward… you’ll just need a little bit of familiarity working with standard HTML5, CSS3, and JavaScript. (Don’t worry, a lot of it is copy + paste.)

Unzip the files
  1. Rename .epub file extension to .zip
  2. Unzip the book (i.e., extract to a regular folder)
Insert PeBL extensions and markup
  1. Download and unzip the PEBL extension starter package
  2. Move the css, image, and script folders into the OEBPS folder in your ebook. (Your ebook may already have one or more of these folders, in which case you can combine the PeBL folders with the ones already in your ebook.)

    These folders should now be subfolders of the OEBPS folder, like this. Your ebook might have other folders in the OEBPS folder, as well.
Add scripts to each page
  1. Do the following to each .xhtml file in the OEBPS folder:
    1. Open file in a script editor.
    2. Move any JavaScript to the bottom of each page so it loads last.
    3. Copy and paste the full text of this document into the head (between the and tags.
    4. Copy and paste any extension scripts into the body content. You can use the sample book as a template and customize your own scripts.
Repackage and test
  1. Zip the folder and rename it as an .epub.
  2. Preview the PeBL ebook.
    1. Go to https://reader.peblproject.org or a PeBL Reader that you’ve installed on your own server.
    2. Drag the file over the browser window until you see a purple border appear around the page content.
    3. Drop the ebook and it will appear temporarily in the Reader window. It will not be viewable to others.
Need help?

And stay in the know by signing up for PeBL news!