![]() |
#1 |
No Comment
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,240
Karma: 23878043
Join Date: Jan 2012
Location: Australia
Device: Kobo: Not just an eReader, it's an adventure!
|
epub formatting - full page images
What I want to do is to embed a full page image on the Kobo, on an internal page that has a header. This page would be the first page of a chapter file.
For the cover, the html is: Code:
<div> <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 450 684" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"> <image height="684" width="450" xlink:href="../Images/Cover.jpg"></image> </svg> </div> For the page (using the cover image as an example): Code:
<h3>Header</h3> <div> <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 450 684" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"> <image height="684" width="450" xlink:href="../Images/Cover.jpg"></image> </svg> </div> Other experimentation has shown that with the Header, there is about 710 vertical pixels on the Glo for the image. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Have you accounted for the top and bottom margins? Or tried a slightly smaller image to see if you can get them on the same screen.
From the CSS side there is a keep with next or previous property that might help, though I don't know if the reader respect them. And a little search suggests moving the heading inside the div and adding "display: inline-block" to the div. That is supposed to try and keep all the elements in the div together. You might also ask in the epub section. The experts on doing this are there. To me this isn't really a Kobo question other than getting the sizes right for the different screen sizes. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
No Comment
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,240
Karma: 23878043
Join Date: Jan 2012
Location: Australia
Device: Kobo: Not just an eReader, it's an adventure!
|
It really isn't a size issue, it's about how the Kobo renderer deals with svg windows, or about how to define the external size of the svg window.
|
![]() |
![]() |
![]() |
#4 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,523
Karma: 167912829
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
.group { page-break-inside: avoid; } <div class="group"> header image </div> This seems to work for me but the images I was using were smaller and I wanted to keep the image and caption together. Regards, David |
|
![]() |
![]() |
![]() |
#5 |
No Comment
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,240
Karma: 23878043
Join Date: Jan 2012
Location: Australia
Device: Kobo: Not just an eReader, it's an adventure!
|
I'll try this today.
What I'm trying to do it set it up so that the SVG window automatically takes up the rest of the space on the page, and then resizes its internals to fit inside that. I just realised that asking this question is going to lead to the: connect usb, edit epub, load epub, disconnect usb, wait for processing, open epub, go to test page, look at test page, go to home page, go to first library page, go to library page with epub on it, delete epub cycle. And I did far too much of that yesterday. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,271
Karma: 78869092
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Maybe you could save some time by having more than one testing book; make several, ensure they are totally distinct internally, and move them all over at the same time; test 5 or 10 versions, each subtly different in the SVG code, and then, based on what you see, change and repeat?
|
![]() |
![]() |
![]() |
#7 | |
No Comment
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,240
Karma: 23878043
Join Date: Jan 2012
Location: Australia
Device: Kobo: Not just an eReader, it's an adventure!
|
Quote:
I usually get efficient with things just before I find the solution and don't have to go through it anymore. |
|
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
And, you missed the "there isn't a change, did I forget to copy the new copy over?". But that isn't as bad as the "Oh no, I forgot to eject before disconnecting". |
|
![]() |
![]() |
![]() |
#9 | ||
No Comment
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,240
Karma: 23878043
Join Date: Jan 2012
Location: Australia
Device: Kobo: Not just an eReader, it's an adventure!
|
Quote:
Quote:
I've found that as long as the drive is marked for quick removal, and you don't have the device drive open in File Explorer, it doesn't seem to mind. |
||
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,271
Karma: 78869092
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
And how about the "Oh Crap... I didn't delete the book before readding it" moment!
|
![]() |
![]() |
![]() |
#11 | |||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#12 |
No Comment
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,240
Karma: 23878043
Join Date: Jan 2012
Location: Australia
Device: Kobo: Not just an eReader, it's an adventure!
|
|
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,271
Karma: 78869092
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Lets hope the efforts go into fixing OTHER issues and not the off by one pixel!
|
![]() |
![]() |
![]() |
#14 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
@murg: Are you still testing this? If so, could you try something. I have been bugged by the fact that replacing an epub with a new version usually means it gets deleted from the device. This has changed with different firmware. After a bit of playing today, it appears that the delete is based on the file size. If the file size of the book is different to the database, the book gets deleted. When I update the database record for the book with the new file size, it doesn't get deleted. Any chance you could try this? It will be a pain, but if it works for someone else, then I can roll it into the calibre driver (well, release the change I've already made). Of course, anyone else who wants to try it, I'll be happy to hear the results. The table is "content". The column is "___FileSize". The row ContentType = 6 and the Title is the book title. The following would find the row for the book "The Help": Code:
SELECT * FROM content where title like '%The Help%' and ContentType = 6 |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
iBooks and full page images problem | pdurrant | Workshop | 12 | 04-21-2012 12:46 PM |
convert to epub - sometimes not a full page displayed | foghat | Conversion | 4 | 12-27-2011 10:42 PM |
prs-505 restart on page formatting (epub) | Fawn | Sony Reader | 4 | 08-30-2011 06:23 PM |
Can I fix ePub page break formatting? | arcane_scholar | Calibre | 3 | 02-02-2011 04:01 PM |
Full page images | graywolf336 | ePub | 3 | 11-17-2010 02:05 PM |