All notable changes to this project will be documented in this file.
Warning: Features marked as alpha may change or be removed in a future release without notice. Use with caution.
- EPUB publications implement a
SearchService
to search through the content. - Known DRM schemes (LCP and Adobe ADEPT) are now sniffed by the
Streamer
, when no registeredContentProtection
supports them.- This is helpful to present an error message when the user attempts to open a protected publication not supported by the app.
- Upgraded to Kotlin 1.5.31 and Gradle 7.1.1
- The default EPUB positions service now uses the archive entry length when available. This is similar to how Adobe RMSDK generates page numbers.
- To use the former strategy, create the
Streamer
with:Streamer(parsers = listOf(EpubParser(reflowablePositionsStrategy = OriginalLength(pageLength = 1024))))
- To use the former strategy, create the
- EPUB style injection when a resource has a
<head>
tag with attributes.
Streamer
takes a new optionalHttpClient
dependency to handle HTTP requests.
Server.addPublication()
is a new API which replacesaddEpub()
and is easier to use.- If the publication can be served, it will return the base URL which you need to provide to the Navigator
Activity
orFragment
. - You do not need to give the publication filename nor add the server port in the
$key-publicationPort
SharedPreference
value anymore.
- If the publication can be served, it will return the base URL which you need to provide to the Navigator
- The HTTP server now requests that publication resources are not cached by browsers.
- Caching poses a security risk for protected publications.
- Upgraded to Kotlin 1.4.10.
Streamer
is now expecting aPublicationAsset
instead of aFile
. You can create custom implementations ofPublicationAsset
to open a publication from different medium, such as a file, a remote URL, in-memory bytes, etc.FileAsset
can be used to replaceFile
and provides the same behavior.
- Streamer API offers a simple interface to parse a publication and replace standalone parsers.
- A generic
ImageParser
for bitmap-based archives (CBZ or exploded directories) and single image files. - A generic
AudioParser
for audio-based archives (Zipped Audio Book or exploded directories) and single audio files.
Container
andContentFilters
were replaced by a shared implementation of aFetcher
.
- Readium can now open PDF documents of any size without crashing. However, LCP protected PDFs are still limited by the available memory.
- Various HTTP server fixes and optimizations.
- Support for Positions List with EPUB, CBZ and PDF. Positions provide a list of discrete locations in a publication and can be used to implement an approximation of page numbers.
- Get the visible position from the current
Locator
withlocations.position
. - The total number of positions can be retrieved with
publication.positions().size
. It is a suspending function because computing positions the first time can be expensive.
- Get the visible position from the current
ReadiumWebPubParser
to parse all Readium Web Publication profiles, including Audiobooks, LCP for Audiobooks and LCP for PDF. It parses both manifests and packages.- (alpha)
PDFParser
to parse single PDF documents.- The PDF parser is based on PdfiumAndroid, which may increase the size of your apps. Please open an issue if this is a problem for you, as we are considering different solutions to fix this in a future release.
- The CSS, JavaScript and fonts injection in the
Server
was refactored to reduce the risk of collisions and simplify your codebase.- This is a breaking change, to upgrade your app you need to:
- Provide the application's
Context
when creating aServer
. - Remove the following injection statements, which are now handled directly by the Streamer:
- Provide the application's
- This is a breaking change, to upgrade your app you need to:
server.loadCustomResource(assets.open("scripts/crypto-sha256.js"), "crypto-sha256.js", Injectable.Script)
server.loadCustomResource(assets.open("scripts/highlight.js"), "highlight.js", Injectable.Script)
- The EPUB parser underwent a significant refactoring to fix a number of issues (contributed by @qnga)
- Metadata parsing was updated to follow our up-to-date specifications.
- XML namespace prefixes are now properly supported, when an author chooses unusual ones.
- Similarly, default vocabularies and prefixes for EPUB 3 Property Data Types are now properly handled.
Server
was broken when provided with publication filenames containing invalid characters.- EPUB publishers' default styles are not overriden by Readium CSS anymore.
- The
AndroidManifest.xml
is not forcing anymoreallowBackup
andsupportsRtl
, to let reading apps manage these features themselves (contributed by @twaddington).