Destroy this instance, allowing used resources to be garbage collected.
Get the IResourceProvider instance that can be used to fetch resources from this publication.
Get the URL to the cover image resource declared in this publication, if any.
To fetch the resource data for this URL, use the IResourceProvider returned by getBackingResourceProvider()
.
The default layout for content documents in this publication.
Get a generated hash signature of the publication, intended to uniquely identify this publication. The hash signature is not the same as the publication id as the hash signature always changes when the publication data changes in any way. The uniqueness of the signature depends on how the publication was loaded. Please refer the implementation responsible for loading this instance. For example, for EPUB see OcfResourceProvider.
Get the Web Publication Manifest for this publication.
Get the media type for this publication
Get all metadata items defined in this publication.
Get the URL to the resource containing the navigation structure for this publication, if any.
Get the global direction in which the Publication content flows. Please note that this is not same as the writing direction. A publication's pages can be ordered from right-to-left, but its text written left-to-right.
Get the default preferred flow mode for content documents in the publication. In other words, it specifies how the publication content should be presented by the reading system.
Get which orientation the author intends the Publication to be rendered in.
Get in which orientations the reading system should present this content document in spread mode.
Get the profile of this publication.
Profiles are publication formats (e.g., audiobooks) describing what type of contents to expect in the publication and in the manifest data.
Get the ContentDocuments representing the readingOrder
of this publication.
Get the type of publication this instance represents.
This allows you to cast an IPublication instance to a more specific subtype.
See PublicationType
for how values map to specific IPublication types.
If this Publication instance has been destroyed.
Get this instance as a plain JSON object.
Creates a new instance from a blob containing the LPF file.
The complete LPF file as a blob.
Creates a new instance by loading the publication from the specified IResourceProvider instance and publication manifest URL.
The resource provider where to fetch resources from.
An absolute or relative URL identifying the manifest of the publication.
A string uniquely identifying this version of the publication. This can for example be a SHA checksum of the publication contents.
A function that will be called when WpPublication.destroy() has been called. This allows for cleaning up ResourceProviders etc.
Creates a new instance by loading the publication from the specified IResourceProvider instance and primary entry page URL.
The resource provider where to fetch resources from.
An absolute or relative URL identifying the primary entry page of the publication. See https://www.w3.org/TR/wpub/#primary-entry-page for more information
A string uniquely identifying this version of the publication. This can for example be a SHA checksum of the publication contents.
A function that will be called when WpPublication.destroy() has been called. This allows for cleaning up ResourceProviders etc.
Creates a new instance by loading an LPF file using an IRandomAccessDataSource instance.
Creates a new instance from a IResourceProvider
representing the LPF file container.
The implementation will look for the Publication Manifest by trying to fetch
first publication.json
and then index.html
.
The resource provider where to fetch resources from.
A string uniquely identifying this version of the publication. This can for example be the SHA1 hash of the publication contents.
A function that will be called when WpPublication.destroy() has been called. This allows for cleaning up ResourceProviders etc.
Generated using TypeDoc
Web Publication implementation of IPublication that can be loaded into the Reading System.
To create an instance, use one of the static methods: