epuBear

Lightweight easily customizable cross-platform EPUB SDK for EPUB readers development

About epuBear SDK

Cross-platform close Core of epuBear SDK provides the following basic functionality:

Features

  • Full compatibility with EPUB2 and partially with EPUB3
  • Open, Unpack and Parse EPUB Documents
  • Read EPUB document from file and from memory (byte array)
  • Get EPUB Document Info
  • Render Pages to Bitmaps

Functions

  • Go to Page
  • Go to Chapter
  • Open Link
  • Change Font Size
  • Switch to DoublePage Mode
  • Switch to Night Mode
  • Bookmarks
  • Text search
  • Change text color
  • Change background color
  • Set Custom Fonts

This set of features will be available to you right away after the purchase. Even though this may seem like all boxes are ticked at first, please feel free to let us know if you consider adding extra features, like DRM for example, could be a good fit for your product. As our primary activity is software development, we'd like to provide you with native customization and maintenance.

How to use

This EPUB SDK is a C++ solution and we prepared native wrappers in Java (Android), Swift (iOS) and C# (Xamarin) for our EPUB toolkit to be compatible with your project. The code of the wrappers acts as proxy between the native code and the core.

/*  Initialization  */

import com.epubear.EpubearFramework;

public class EpubearView extends View implements EpubearFramework.EventListener {

    private EpubearFramework epubear;
    private Map bitmaps;

    public EpubearView(Context context) {
        ....
        //  create instance
        epubear = new EpubearFramework(context, dataDir);
        epubear.setEventListener(this);
        ....
    }

    @Override
    public void onSizeChanged(int w, int h, int oldw, int oldh) {
        ....
        //  init framework with target width/height
        epubear.updateBitmapSize(w, h);
        ....
    }

    @Override
    public void doInitDisplay() {
        ....
        //  create bitmaps
        //  register them in framework
        for (Map.Entry entry : bitmaps.entrySet())
            epubear.registerBitmap(entry.getKey(), bitmap.getValue());
        ....
    }
}

/*  Navigation  */

//  open epub
epubear.openFile(path);

//  go to next page
epubear.openNextPage();

//  go to previous page
epubear.openPreviousPage();

//  get Table of Contents
Map tocList = epubear.tableOfContents();

//  open chapter from table of contents
epubear.openChapter(caption);

//  font increase
epubear.increaseFont();

//  font increase
epubear.decreaseFont();
// Framework initialization and book opening, if book cannot be opened returns nil
// BookViewController.swift

override func viewWillAppear(animated: Bool) {
    ...
    frameworkInstance = EPUBearFramework(bookPath: self.bookPath, withCachePath: self.cachePath)
    ...
}

override func viewDidLayoutSubviews() {
    ...
    let scale = UIScreen.mainScreen().scale;
    let scaledSize = CGSize(width: view.bounds.size.width * scale, height: view.bounds.size.height * scale)
    frameworkInstance.resizeBitmapsIfNeeded(scaledSize)
    ...
}

// Bitmaps getters
frameworkInstance.centerImage();
frameworkInstance.leftImage();
frameworkInstance.rightImage();

// Navigation through book
frameworkInstance.openNextPage();
frameworkInstance.openPreviousPage();
frameworkInstance.openPage(page);

// Navigation through chapters
frameworkInstance.openChapterAtIndex(index);

// Change font size
frameworkInstance.increaseFont();
frameworkInstance.decreaseFont();
// BookViewController.cs

private EPUBearFramework _framework;

public override void ViewDidLoad()
{
    base.ViewDidLoad();

    var bookPath = (Element as BookPage).BookPath;
    var cachePath = (Element as BookPage).CachePath;

    _framework = new EPUBearFramework(bookPath, cachePath);
    _framework.WeakDelegate = this; // to handle framework callbacks
}

public override void ViewDidLayoutSubviews()
{
    ...
    var viewSize = View.Bounds.Size;
    var scale = UIScreen.MainScreen.Scale;
    var scaledSize = new CGSize(viewSize.Width * scale, viewSize.Height * scale);
    _framework.ResizeBitmapsIfNeeded(scaledSize);
    ...
}

// Book Navigation
_framework.OpenChapterAtIndex(chapterIndex);
_framework.OpenPage(pageNumber);
_framework.OpenPreviousPage();
_framework.OpenNextPage();

// Change font size
_framework.IncreaseFont();
_framework.DecreaseFont();

// Way to access rendered pages as CGImage objects
var pages = new CGImage[3];
pages[0] = _framework.LeftImage;
pages[1] = _framework.CenterImage;
pages[2] = _framework.RightImage;

// Way to check first && last pages
_framework.CanScrollToLeft;
_framework.CanScrollToRight;

// Way to change night\normal mode
_framework.SetAppearanceMode(EPUBAppearanceMode);

// Framework delegate methods
IEPUBearFrameworkDelegate.ContentUpdated();
IEPUBearFrameworkDelegate.PageCountChanged(pageCount);

Use the links below to download developer documentation:

EpuBear Demo Apps

Our epuBear Reader acts as a standalone reader for EPUB format books with no ads and no limitations on functionality. It is based on epuBear SDK developed by Scand. Besides, the apps show the benchmark report of epuBear performance.

epuBear Demo Reader Features:

  • Compatibility with EPUB 2 format
  • Navigation through pages, chapters, bookmarks, and links
  • Night mode
  • Text search
  • Audio and Video support

Pricing

  • 1 Binary Licence
  • 1 Application
  • 1 Application
  • 1 Year of support
$ 699
Android:
1
iOS:
0
Xamarin:
0

Once you realize that you want to have some additional functionality, please, let us know by leaving a message on the contact form below. We could help you to build individual EPUB reader based on epuBear SDK. Just describe your needs and our manager will contact you for the further details.







Thank you for placing an order! Our team appreciates your time and we will reach you as soon as possible.