epub3

Creator: coderz1093

Last updated:

0 purchases

epub3 Image
epub3 Images
Add to Cart

Description:

epub3

epub3(epub-rs 3.0) #
epub3 is an implement of epub-rs.
Support epub: 2.0, 2.0.1, 3.0, 3.0.1, 3.2, 3.3.
Reader and Writer with content are fully tested.
Example with dart:io #
import 'package:epub3/epub3_io.dart' as epub;

final book = epub.readFile('test/res/alice.epub')!;
print(book.version); // Version.epub3
print(book.title); // Alice's Adventures...
print(book.author); // Lewis Carroll
print(book.chapters); // first level chapters
copied to clipboard
Example without dart:io #
import 'package:epub3/epub3.dart' as epub;
import 'package:archive/archive.dart';

final book = epub.Reader.
open(ZipDecoder().
decodeBytes(bytes_or_file_content)).
read();
copied to clipboard
Example write a new epub file #
The new.epub file generated by this example passed epubcheck
import 'package:epub3/epub3_io.dart' as epub;

final book = epub.Book.create(
title: 'dream world',
author: 'joe doe',
);

book.add(
epub.Chapter(title: 'Part 1', children: [
epub.Chapter.content('Chapter 1', 'Content of Chapter 1'),
epub.Chapter.content('Chapter 2', 'Content of Chapter 2'),
]),
);

epub.writeFile(book, 'new.epub');
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.