You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that you can get the version from the OPF, but that requires passing in a zip. We are currently using r2-shared-js and already have the publicationParser working (it works great! So thanks for that!). But we would like to be able to tell if it's an EPUB 2 or EPUB 3 or higher, just from the publicationParser.
Here is an excerpt of what we are doing:
const pub = await publicationParser.PublicationParsePromise(path);
if (typeof pub.Metadata.Title === "string") {
bookTitle = pub.Metadata.Title;
coverUrl = pub.GetCover()?.Href || '';
manifest = serializable.TaJsonSerialize(pub);
const zipInternal = pub.findFromInternal("zip");
if (!zipInternal) {
throw new Error("There is no publication zip!");
}
It would be nice if we could check, for instance. pub.Version and be able to tell the EPUB version. Is there another way to do this?
Thanks!
Jonah
The text was updated successfully, but these errors were encountered:
I see that you can get the version from the OPF, but that requires passing in a zip. We are currently using r2-shared-js and already have the publicationParser working (it works great! So thanks for that!). But we would like to be able to tell if it's an EPUB 2 or EPUB 3 or higher, just from the publicationParser.
Here is an excerpt of what we are doing:
It would be nice if we could check, for instance. pub.Version and be able to tell the EPUB version. Is there another way to do this?
Thanks!
Jonah
The text was updated successfully, but these errors were encountered: