Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-02-2023, 08:15 PM   #16
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 6,883
Karma: 4526138
Join Date: Nov 2009
Device: many
Again for future reference if needed:

It seems that EPUBCheck 5.0.0 may have issues with not tracking links that exist in object tags (they ignore the data url in their search).

I have attached an extended PDF test case that tries 3 different ways to include foreign content (a pdf file).

In the first test (Section0001.xhtml) is just tries to link internally to the pdf using an anchor href, and the manifest fallback is provided in the opf but it is ignored.

Section0002.xhtml is the fallback.

In the second test (Section0003.xhtml) it just tries to load the pdf in an iframe but again the manifest fallback is ignored and an empty iframe is generated if pdf is not supported.

In the third test (Section0004.xhtml), I used object tags to provide a proper html fallback mechanism - ignoring the manifest fallback since it appears few if any support any manifest fallbacks and they are discouraged.

This third approach appears to always work but it appears you can not satisfy epubcheck 5.0 because the data url in the nested object tag is ignored.

Here are the epubcheck 5.0.0 errors:

Section0001.xhtml, 15, 1280, Col: 33: ERROR(RSC-011): Found a reference to a resource that is not a spine item. (this is the link in the first test to an embedded pdf).


content.opf, 16, 1172, Col: 100: ERROR(OPF-096): Non-linear content must be reachable, but found no hyperlink to "OEBPS/Text/Section0002.xhtml" (which is wrong as the object tag data url literally points directly to that file).

I have attached the new pdf test case which a modification of the earlier one to test out if a safer way to embed pdfs can be found that will work in most e-readers.


Update:

FWIW, the very latest Thorium does not support the manifest fallback at all, but the latest Thorium will successfully load an embedded pdf in an iframe and will show the embedded pdf in the object tag test (with proper fallback to xhtml provided by the child object tag).

So it appears if epub devs want to make fallbacks actually work in an epub, then the best way to handle that is use an xhtml file which has nested object tags. The first points to the foreign resource and the second nested child acts as the xhtml fallback.

This nicely keeps the spine pure xhtml.
Attached Files
File Type: epub embedded_pdf_iframe_object_epub3.epub (309.5 KB, 26 views)

Last edited by KevinH; 04-02-2023 at 08:33 PM.
KevinH is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MIME type for Nook? angharad09 ePub 9 08-27-2020 05:39 PM
On The MIME Type of ePUBs baskerville Kobo Developer's Corner 0 06-12-2018 06:22 AM
Calibre mixed pdf and ebook types in a book name tkassila Introduce Yourself 2 05-31-2017 07:30 PM
.MOBI Mime Type NicWest Kindle Formats 1 11-12-2010 06:42 PM
Supporting EML (MIME e-mail) input format? TMF Calibre 2 09-27-2009 05:12 AM


All times are GMT -4. The time now is 02:04 AM.


MobileRead.com is a privately owned, operated and funded community.