DefaultPublicationParser
class DefaultPublicationParser(context: Context, httpClient: HttpClient, assetRetriever: AssetRetriever, pdfFactory: PdfDocumentFactory<*>?, additionalParsers: List<PublicationParser> = emptyList()) : PublicationParser
Default implementation of PublicationParser handling all the publication formats supported by Readium.
Parameters
additionalParsers
Parsers used to open a publication, in addition to the default parsers. They take precedence over the default ones.
httpClient
Service performing HTTP requests.
pdfFactory
Parses a PDF document, optionally protected by password.
assetRetriever
Opens assets in case of indirection.
Constructors
Link copied to clipboard
constructor(context: Context, httpClient: HttpClient, assetRetriever: AssetRetriever, pdfFactory: PdfDocumentFactory<*>?, additionalParsers: List<PublicationParser> = emptyList())
Functions
Link copied to clipboard
open suspend override fun parse(asset: Asset, warnings: WarningLogger?): Try<Publication.Builder, PublicationParser.ParseError>
Constructs a Publication.Builder to build a Publication from a publication asset.