![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O, Libre 2
|
Preview by Page
Is is possible to set the preview window to treat the viewable area as its own page?
With the continuous scrolling, it seems to behave as though the file/chapter being viewed is a single page. I have a situation where there is an image at the beginning of every chapter. I use SVG, and set the height of the image to 15%. This works as expected on the e-reader, but does not render the same in the Sigil preview window. |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,475
Karma: 5703586
Join Date: Nov 2009
Device: many
|
There is no fixed Preview size in Sigil and no fixed Page size. Preview is not an e-reader. Download and install a good thirdparty e-reader such as Thorium or any Readium variation and load it to see what an e-reader might show.
But be careful to try your epub in a number of e-readers as page sizes and paging can be handled quite differently. Try setting a max-size on the css on the svg image Or size it using 15vh (where 100vh is one window height). Last edited by KevinH; 04-25-2021 at 11:02 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O, Libre 2
|
Using vh worked, thank you. Is vw window width?
I have been using Calibre to test view my books, but I will look into the other e-readers. What I was trying to do with the Sigil preview was to size the window so that a page of text matched what I see on my Kobo. Would it be possible for preview to treat the window size, whatever it is dragged to, to be the page size? What if, for example, it just interpreted height % as vh instead? I understand that preview is not an e-reader. But it is nice to get the immediate feedback while editing. The closer it can mimic an e-reader, the more useful it is to me. |
![]() |
![]() |
![]() |
#4 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,475
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Yes vw is a unit of 1/100th of the screen width. Chrome's browser engine (i.e. QtWebEngine/Preview) is a big supporter of using vh and vw with svg images over the older % format that Webkit used. Chrome's engine treats % much different from vh and vw units.
% according to css rules, is supposed to be relative to the parent element that contains it. In some cases that is a document height. The vw and vh are always relative to the viewport (screen size). All browser based engines such as Calibre editor, Thorium, Readium, and etc should support the vh and vw. The old % for svg is just not used much given it is interpreted differently by different engines. You should be able to detach Preview and make it be the size of a Kobo screen but I have no idea what built-in css for margins and spacing are, fonts used, etc for that e-reading device so it may take some changed css and trial and error. I can not make Preview act more e-reader like as different e-readers with their different layout engines all react differently. Trying to mimic one reader is pretty much worthless for epub developers who need their epubs to look good on a wide variety of devices. Again, that is why testing on a large number of e-reading devices is so critical to find robust compromises. KevinH Quote:
Last edited by KevinH; 04-25-2021 at 07:37 PM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Page preview on Kindle Oasis 2 | superlu | Devices | 2 | 01-18-2019 04:41 PM |
preview vs print preview | isalherbo | Sigil | 7 | 04-23-2013 03:52 PM |
How to preview first EPUB embedded image (not cover page!) | Mdemaillard | Library Management | 7 | 01-14-2013 04:06 AM |
Amazon Preview "page limit"? | jayz | Kindle Formats | 0 | 10-06-2012 02:24 PM |
small preview page images | goodnerd | Kindle Formats | 5 | 09-22-2011 11:39 AM |