All Downloads are FREE. Search and download functionalities are using the official Maven repository.

viewer.book.00_cover.html Maven / Gradle / Ivy

The newest version!

epublib - a java epub library

Epublib - a java epub library

Epublib is a java library for reading/writing epub files. It comes with both a viewer and a command-line tool. It’s intended use is both as part of a larger java application and as a command-line tool.

Features

Builtin viewer
A viewer that supports table of contents, guide, meta info and pages.
Comprehensive coverage of the epub standard
Simple things are simple

The api is designed to be as simple as possible, while at the same time making complex things possible too.

// read epub
EpubReader epubReader = new EpubReader();
Book book = epubReader.readEpub(new FileInputStream("mybook.epub"));

// set title
book.getMetadata().setTitles(new ArrayList<String>() {{ add("an awesome book");}});

// write epub
EpubWriter epubWriter = new EpubWriter();
epubWriter.write(book, new FileOutputStream("mynewbook.epub"));
Cleans up html into xhtml
Does not remove non-standard tags and attributes, but makes html files into valid xml (using xmlcleaner http://htmlcleaner.sourceforge.net/)
Cleans up non-standards compliant epub
Epublib tries to be as forgiving as possible when reading epubs and writes them as standards-compliant as possible.
If you’ve created an epub by zipping up several html files then running it through epub will make it much more standards-compliant.
Fixes the coverpage on many readers
For different epub readers the coverpage needs to be specified in a different way. Epublib tries several ways of extracting the coverpage from an existing epub and writes it in such a way that most (all the readers I’ve tested it on) display the coverpage correctly.
Support for creation of epubs
The api supports the creation of epubs from scratch. See Creating a simple book example for an example.
Convert (uncompressed) windows help (.chm) files to epub
After uncompressing a windows help file with something like chmlib epublib can make an epub file out of the resulting html and windows help index files.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy