Open Hasimir opened 8 years ago
My current method of fixing this is to just edit the content.opf file manually while updating other parts of the metadata.
Need to provide either a failing test case or details of how to reproduce the failure.
I'm sure I can whip up something small and nearly pointless to test with a bit later. The "placeholder" images might be a bit silly, though.
Okay, I have a test project which reproduces this error here. It also demonstrates the incorrect date error since it includes a completed transformation to EPUB 3 and I added a detached GPG signature in the output folder with the epub so it can demonstrably proven to have been generated before the date and time in UTC it says it was created (and so is this comment, actually).
Also, chapter 2 in the test book includes all the configuration for the transformation scenario used to create the file, including screen captures from oXygen. That said, in its current form it will not pass an epubcheck, but can still be opened in most epub reader apps, including Readium.
The bug results from the new image-list processing, which produces an OPF entry for every image listed there, as well as an entry for the referenced cover image, however it was referenced (epub-cover-graphic or runtime cover graphic image parameter).
I'll have to figure out how to eliminate the duplicate and ensure that there is a "cover-graphic" property on the one OPF item.
From my tests it looks like the only essential part is the addition of properties "cover-image">
to the element, not the id="coverimage"
so if there were a check for a cover image when building the image list and appending the properties when found would probably do it.
Oh, I've also confirmed that #70 is indeed fixed.
In order to have a cover image appear in Apple iBooks, an EPUB needs an entry in the manifest like this:
The current plugin does consistently include this at the end of the list of images in the manifest when the epub-cover-graphic element is correctly specified:
Even with that being the sole reference to the smaller copy of the cover image, the transformation produces two entries in the manifest for the for that image.
Here are all the image references from the DITA/D4P source files for the same project.
From the pubmap file:
From a resources.ditamap file which is both included as reference-only and in which each resource is also included with the "resource-only" processing role:
Yet the generated manifest in an EPUB 3 file results in this:
In this case the duplicate entry is "image-list-item-3" but the actual point at which it will appear will depend on what other files are included in any given project.
The actual full size cover is listed in the manifest as "image-list-item-6" as it is loaded only in cover.dita (called with the front-cover element) and referenced in the resources map. The transformation process does produce a warning regarding that file, but it does not prevent the epub being created. The warning is almost certainly unrelated to this bug, but I am including it for the sake of completeness:
Note that the d4pCover element cannot have a title set, so this error is actually the least bad configuration.