public final class EpubPackage extends Object implements IPageTextExtractor
Provides the information of a EPUB package.
Package contains content documents. For example, each chapter is contained in a separated content document. Count property returns a total number of content documents in the package:
int documentCount = epubPackage.getCount();
To extract a text from content document ExtractItem method is used:
String text = epubPackage.extractItem(0);
Modifier and Type | Method and Description |
---|---|
String |
extractItem(int itemIndex)
Extracts a text form the content document.
|
String |
extractPage(int pageIndex)
Extracts all characters from the page with pageIndex and returns the data as a string.
|
String |
get_Item(int index)
Gets a path to the content document file.
|
int |
getCount()
Gets a total number of content documents.
|
int |
getPageCount()
Gets a total count of the pages.
|
List<TableOfContentsItem> |
getTableOfContents()
Gets a collection of table of contents items.
|
public int getCount()
Gets a total number of content documents.
public List<TableOfContentsItem> getTableOfContents()
Gets a collection of table of contents items.
public int getPageCount()
IPageTextExtractor
Gets a total count of the pages.
getPageCount
in interface IPageTextExtractor
public String get_Item(int index)
Gets a path to the content document file.
index
- An index of the content document.public String extractItem(int itemIndex)
Extracts a text form the content document.
itemIndex
- An index of the content document.public String extractPage(int pageIndex)
Extracts all characters from the page with pageIndex and returns the data as a string.
extractPage
in interface IPageTextExtractor
pageIndex
- The index of the page.Copyright © 2018. All rights reserved.