I am currently using epublib-core
to read epubs and display them in Android WebView
with the following code -
webView.loadDataWithBaseU
To get horizontal pagination add css
attribute to html
before loading to WebView
String html = getBookContent(); // load epub content to String
int density = getResources().getDisplayMetrics().density;
int width = (int) Math.floor(mWebView.getWidth() / density);
int height = (int) Math.floor(mWebView.getHeight() / density);
String style= "\n" +
"";
html = html.replace("", style);
html = html.replace("%width", String.valueOf(width));
html = html.replace("%height", String.valueOf(height));
mWebView.loadDataWithBaseURL(baseUrl, html, "text/html", "utf-8", null);