No description
Find a file
dependabot[bot] 3151eb1257
Bump tiles-maven-plugin from 2.21 to 2.22 (#15)
Bumps [tiles-maven-plugin](https://github.com/repaint-io/maven-tiles) from 2.21 to 2.22.
- [Release notes](https://github.com/repaint-io/maven-tiles/releases)
- [Changelog](https://github.com/repaint-io/maven-tiles/blob/master/CHANGELOG.adoc)
- [Commits](https://github.com/repaint-io/maven-tiles/compare/tiles-maven-plugin-2.21...tiles-maven-plugin-2.22)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-26 15:57:53 +01:00
.github Adopt and release to Maven Central (#2) 2020-08-30 19:42:58 +01:00
src Add support for adding custom metadata (#8) 2020-11-22 09:37:02 +00:00
.gitattribute Create .gitattribute 2017-03-10 13:41:17 +02:00
.gitignore Adopt and release to Maven Central (#2) 2020-08-30 19:42:58 +01:00
LICENSE Create LICENSE 2016-03-30 09:08:29 +02:00
pom.xml Bump tiles-maven-plugin from 2.21 to 2.22 (#15) 2021-05-26 15:57:53 +01:00
README.md Adopt and release to Maven Central (#2) 2020-08-30 19:42:58 +01:00

epub-creator

GitHub release (latest by date) GitHub Release Date

Nexus Maven-Central

Java EPUB3 creator API

Create EPUB3 standard ebooks.

Features

  1. Build valid EPUB3 (Validator)
  2. Add files or text as content
  3. Set TOC inclusion
  4. Set spine inclusion
  5. Add text as content/pages

Build instructions

You will need

  1. Java 8+
  2. Maven 3+
mvn clean install

Code example

try (FileOutputStream file = new FileOutputStream(new File("test.epub"))) {

            EpubBook book = new EpubBook("en", "Samuel .-__Id1", "Test Book", "Samuel Holtzkampf");
            book.addContent(this.getClass().getResourceAsStream("/epub30-overview.xhtml"),
                    "application/xhtml+xml", "xhtml/epub30-overview.xhtml", true, true).setId("Overview");
            book.addContent(this.getClass().getResourceAsStream("/idpflogo_web_125.jpg"),
                    "image/jpeg", "img/idpflogo_web_125.jpg", false, false);
            book.addContent(this.getClass().getResourceAsStream("/epub-spec.css"),
                    "text/css", "css/epub-spec.css", false, false);
            book.addTextContent("TestHtml", "xhtml/test2.xhtml", "Test one two four!!!!!\nTesting two").setToc(true);
            book.addTextContent("TestHtml", "xhtml/test.xhtml", "Test one two three\nTesting two").setToc(true);
            book.addCoverImage(IOUtils.toByteArray(this.getClass().getResourceAsStream("/P1010832.jpg")),
                    "image/jpeg", "images/P1010832.jpg");

            book.writeToStream(file);
        }