Version: (using KDE 4.2.90) OS: Linux Installed from: Ubuntu Packages For an example, use Okular to open the EPUB document at <http://www.webscription.net/p-379-1632.aspx>. The cover image will not display. A "blank page" icon appears in it's place. Lots of errors shown, e.g.: libepub (II): guide item: Cover href: content/calibre_title_page.html type: cover libepub (II): resources/_cover_.jpg - No such file Root cause: /content/calibre_title_page.html: <img src="resources/_cover_.jpg" alt="cover" style="height: 100%"/> "resources" is a subdirectory of content, i.e. the path needs to be resolved to "/content/resources/_cover_.jpg".
Note - EPUB can have several HTML files which are then combined together. At the moment, all the HTML files are inserted into a single QTextDocument. But the HTML files could be in different directories. I think we need a separate QTextDocument for each HTML file. I'm hoping they can then be combined using frames, as in QTextCursor::insertFrame().
Created attachment 35019 [details] All errors from opening the file (See original description for a link to the problem file).
Re #1: oops. I misread the documentation. "Frames" in QTextDocuments don't work that way - they don't use a different QTextDocument. I don't think there is a way to solve this with a single QTextDocument, other than rewriting the HTML.
Ely?
Yes, I've been trying to figure out how it should work for a while. I had no great idea... I wonder how the mobi backend solved that, after all they should go into the same issue.
I have same problem: libepub (II): OEBPS/../styles/style001.css - No such file libepub (II): OEBPS/../images/img0001.jpg - No such file libepub (II): OEBPS/../images/img0001.jpg - No such file libepub (II): OEBPS/../styles/style001.css - No such file I can't see any images. When open text editor, and change all links: From: <link href="../styles/style001.css" rel="stylesheet" type="text/css"/> <p class="sgc-2"><img border="0" src="../images/img0001.jpg"/></p> To: <link href="styles/style001.css" rel="stylesheet" type="text/css"/> <p class="sgc-2"><img border="0" src="images/img0001.jpg"/></p> Then Okular works good. Can anyone solve this problem?
*** Bug 236454 has been marked as a duplicate of this bug. ***
@Alan: looks like the two documents work a bit better with ebook-tools 0.2.x, can you confirm? @Vytax: hard to say what is the real issue without a document... please check with ebook-tools 0.2.x, and if the problem is still there, attach a document (if public) showing the issue.
I try with ebook-tools 0.2.1, but still same problem exists. Samples: http://skaitykle.lt/res/download_ebook/108?name=dzekas-londonas-baltoji-iltis.epub http://skaitykle.lt/res/download_ebook/110?name=juozas-tumas-vaizgantas-dedes-ir-dedienes.epub
SVN commit 1182629 by pino: Apply a way to resolve the real location of resources to load. When iterating through the document HTML files, set in the epub document the URL of the current file being loaded, so it is possible to resolve the locations of resources based on the base URL of the current file. This makes it possible to load resources like "foo.css", "somedir/foo.css", "../somedir/foo.css" and so on. BUG: 198764 FIXED-IN: 4.6 M +2 -0 converter.cpp M +18 -1 epubdocument.cpp M +3 -0 epubdocument.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1182629