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?
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