Summary: | EPUB: relative URLs are not resolved (causes e.g. cover image to not display) | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Alan Jenkins <alan.christopher.jenkins> |
Component: | EPub backend | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | elylevy, jthorell, Vmickus |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.6 | |
Attachments: | All errors from opening the file |
Description
Alan Jenkins
2009-07-03 12:28:32 UTC
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 |