Quote:
Originally Posted by u238110
So, there are three factors here. Ability to designate an xhtml file as the cover image; ability to designate an image file as the cover image; and ability to add a cover image in metadata. One wonders why Calibre gives a user the option to set a page and an image as the cover image both at the same time (I'm talking about right-clicking one of the listed xhtml files and rigfht-clicking oen of the image files). Anyway, I tried annhiliating calbre's concept of a cover image entirely by disbaling all of these, and even then I wasn't able to prevent the image from displaying first (once again, the image was on the second page of the epub). So, the first xhtml file was my text ad and the second one was the book cover image (although it wasn't designated as such, but rather just a page with an image). I also tried completely deleting the image entirely. Well, this got rid of the image and the result was that the ad appeared as the first thing in Mobipocket Reader and it did not appear in FBReader. And in case you haven't been following, SumatraPDF never gave me a problem and when my ad was set as the first page, it always appeared first, no matter the various nonsensical "cover image" configuarations. I also subsequently discovered that Calibre has its own reader and it too never gave me any problems. And I finally tested it in a first edition Kindle (which required converting to .mobi, of course) and my ad did not appear in the Kindle. what's interesting is that my text ad was entirely missing from the Kindle manifestation and the FBReader manifestation: I used the searches to search for the words in my ad and the searches revealed that my ad simply hadn't regsitered with the document. And I'l emphasize that when these same files were opening up in Mobipocket, Sumatra, and Calibre's viewer, my ad did register. Once again, the latter two were always just fine; Mobipocket always gave the image priority, no matter what.
I tried an interesting experiment. I started a brand new document in Calibre's editor and I simply created three pages: I put text on the first page, an image on the second page, and text on the third page. This is the format that I'm going for. Ad (text) followed by cover (image), followed by book (text). However this time it was as much of a clean slate as possible: just three simple newly created xhtml pages. And the result? Only the first page registered in all of the manifestations.

|
Here's the thing: a PDF, scientific or otherwise, doesn't "care" what's what, when it's built. It doesn't matter to a print document if an image is the first page or the nth. It doesn't care if you have 100 images, or 1, or none. It doesn't care about print/text. This is because a PDF simply carries what's placed ON it, and has zero structure.
An actual eBook, however, whether ePUB or MOBI, has STRUCTURE. Without the structure, it's either corrupted, or doesn't function, or doesn't (in the case of ePUB) pass ePUBcheck. It's not simply a set of "pages" carrying whatever is slapped on them. An ePUB is a container that has a spine, and has designated places (and meta, etc.) for each element that makes it work.
What you are trying to do is to essentially
violate that structure. And you're angry because it's not working?
All you have to do is simple: make your "ad" an image. Then make it the first page of the book. That will solve your problem. You may find that using SVG solves this for you best, but a jpg or PNG will do. That fulfills the "need" of the eBook for the structure it requires, and solves your problem at the same time. But if you continue to try to put a file outside of the required structure of the book, it's not going to work. I mean, sure, it might work in a PDF reader--because the PDF reader doesn't care--but it won't work reliably.
Use an image where the spine, etc., expects an image, and you'll have your solution.
FWIW.
Hitch