![]() |
#16 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,492
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Best to generate a Report after opening a dodgy epub. It can identify the broken links/missing targets, etc... that result from not-well-formed epubs being run through Sigil's normalization process. Hopefully there will be a version of Sigil someday that will allow you to keep the original internal structure of an epub intact (eliminating the need to update links upon opening). But we're not there yet. |
|
![]() |
![]() |
![]() |
#17 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,583
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Unfortunately, Sigil can*not auto fix all broken epubs on import. For those cases, you may want to run a Report and then fix any broken links and things manually. Followed by either FC or epubcheck to verify other epub structures.
In many cases, broken links exist because the underlying file system is not case sensitive and so the urls appear to work for the user on those systems when in fact they are broken. Linux is a nice testing ground for these types of path case issues because it defaults to a case-sensitive file system which makes these types of errors easier to find and fix by a quick visual scan of images in the epub. Last edited by KevinH; 07-26-2016 at 12:17 PM. Reason: DiapDealer beat me to it! |
![]() |
![]() |
![]() |
#18 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jul 2016
Device: Nook
|
So I'm struggling to get this to work no matter what I try.
My last attempt was to recreate the epub anew with a new file name, unzip it, create a new 'Images' folder in there and place 'gold-aureus.jpg' in there. The CSS is amended to point to 'Images/gold-aureus.jpg' and the opf file has this line added to it too: Code:
<item id="gold-aureus.jpg" href="Images/gold-aureus.jpg" media-type="image/jpeg"/> When I open it in Sigil, the image is now in the Images section (left-hand panel), but the image still doesn't appear. Mend xhtml source on open and save are both checked in the preferences. |
![]() |
![]() |
![]() |
#19 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,492
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm assuming the css has been amended to:
Code:
h1:before { background-image: url('../Images/gold-aureus.jpg'); display: block; } |
![]() |
![]() |
![]() |
#20 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,583
Karma: 5703586
Join Date: Nov 2009
Device: many
|
I am not sure what you are seeing or why.
What does epubcheck say about the original epub you are trying to work with? Is this a public domain epub that I can test with? If so, would you point me at it. If not, would you please *privately* post it someplace and pm either DiapDealer or myself (KevinH) with the url so as not to violate the rights of the holder. Also, what happens if you simply open the original epub in Sigil? If an image is missing, you can use Sigil's Add Existing menu to add back that image from an unzipped copy of the epub. What does Report say? Is it only that one image missing? KevinH |
![]() |
![]() |
![]() |
#21 | ||
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jul 2016
Device: Nook
|
Quote:
Code:
background-image: url('../Images/gold-aureus.jpg'); Code:
background-image: url('../Images/gold-aureus.jpg'); Quote:
I'll PM a link shortly |
||
![]() |
![]() |
![]() |
#22 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,492
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
You wouldn't happen to be opening this epub using the calibre Open With plugin would you? I only ask because jpeg images aren't showing up at all for me when opening epubs from calibre with Sigil with the Open With plugin (I'm sure I'm using an older version though).
PNGs show up just fine (and the jpegs show up just fine when opening the epub through the "usual" methods). It's only when using the Open With plugin on Windows that Sigil thinks all jpegs are 0x0 bytes. |
![]() |
![]() |
![]() |
#23 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,583
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Tried your updated bug epub and the url is properly updated.
That said, your css is simply wrong: Pseudo-Elements are done as follows: Code:
selector::pseudo-element { property:value; } Also the pseudo-element "::before" does not exist or validate in CSS 2.1 but does validate for epub3. Also as anything *before* the initial heading element in your example has no vertical size, no background image is displayed (as the image height would be 0). So changing that css to something along these lines is what I think you want: Code:
h1::before { content: url('../Images/gold-aureus.jpg'); display: block; } So there is no bug here that I can see. KevinH |
![]() |
![]() |
![]() |
#24 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jul 2016
Device: Nook
|
OK, I had to do a few other changes but I managed to get this to work. The CSS amendments that you suggested seemed to be the key ones.
Thanks for your help David |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
FBReader Pro Default temp files folder | OldLincoln | Android Devices | 2 | 04-24-2016 10:28 AM |
temp file | rylee | Library Management | 4 | 08-22-2014 07:41 AM |
Aura "REWFY.exe" file in my temp folder | bawldiggle | Kobo Reader | 3 | 08-17-2014 09:31 AM |
Conversion and Temp folder issues | OscarWilde | Calibre | 7 | 11-16-2013 07:45 PM |
Calibre files left in Temp folder | itimpi | Calibre | 8 | 05-06-2009 06:15 AM |