![]() |
#16 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 603
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
|
Quote:
Code:
@page {margin:0;} body, p {margin:0;} Code:
body, p {margin-left:0;margin-right:0;} create a page with these simple, minimalistic css instructions: Code:
/* set all page margins to 0 */ @page {margin:0;} body, p, div { margin:0; padding:0; } /* foreground color to black and background color to white */ p, div { color: black; background-color: white; } /* save the book as as .epub and/or .kepub.epub /* /* The black foreground area is the actual text display window /* The white edge at the top, right, bottom and left are the /* minimum default margins set by Kobo and which can not be /* altered by the user or CSS properties. /* /* In short, Kobo readers don't use the full screen to display text. /* That is an decision made by Kobo and Kobo is the only manufacturer /* to my knowledge that does this. /* /* E.g. Kobo Touch /* Screen size: 800 × 600 /* Kobo default minimum margin: 10px (approximately, it represents the /* white margins around the edge of the screen.) /* The maximum, useable available screen resolution is: 780×580. /* But this is even to optimistic as Kobo also uses /* a relative huge bottom margin /* and in the case of Kobos proprietary kepub format also /* a relative huge top margin /* /* Same applies to other Kobo readers, just 'scale' the /* minimum Kobo default margin |
|
![]() |
![]() |
![]() |
#17 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
Then, if Kobo ever again decide to change the default top margin in new firmware, all you need to do is change one line and resend all your books from calibre. As they already did this twice in my short Kobo experience, I like to be prepared ![]() ![]() Last edited by jackie_w; 02-21-2014 at 07:35 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
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
|
Anak: Firstly, you have the colours reversed. It didn't show up how you wanted it to.
And you are wrong about the side margins. Or at least for an epub. For both my Glo (FW3.2.0) and my Touch (FW3.0.1), the text stretches all the way across the screen. There is a small gap at the top and the footer at the bottom. The margin at the bottom is a bit harder to judge. The black background stops with the text, not the bottom of the view port. Attached is a screen shot from the Glo that shows how much space is being used. Kepubs are different. They do have a fixed margin on the sides. And they have the header. The footer appears to take the same space. |
![]() |
![]() |
![]() |
#19 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
If there are any "@page" rules in "kobo_extra.css", it removes any existing @page rules from the stylesheets in the epub. I now should create a kobo-extra.css file , as per the above , and place it in root directory of Kobo Aura via windowcopy/paste ? calibre adds a page_styles.css @page { margin-bottom: 5pt; margin-top: 5pt } to every conversion ? so I need to decide on a margin-bottom: value or else the calibre code will be removed & it will default to ?zero? - which may actually be good as the general gripe seems to be too much white space at bottom ? having done that I need to place the kobo_extra.css file in root directory of Kobo, via windows copy/paste, and then re-send my books in order to see the effect ? I have tried that & I am not seeing any effect ? i am seeing 2 x enabled kobo device drivers in calibre - that is one too many , and that is maybe the problem ? kobo reader device interface 2.16 timothy Legge and David Forrester kobo touch interface 2.1.6 David Forrester i will disable the 1st one & try again NO - still not seeing it- I my check .css - i see a missing } could be why 3rd try: 3rd FAIL my kobo_extra.css file is @page {margin-top: 10pts; margin-bottom: 0:} body { orphans: 0; widows: 0; } this file is in root of Kobo Aura calibre is showing only 1 active Kobo driver - the one with modify CSS ticked. I wonder do I need a restart of calibre to get the new choice of Kobo device driver to take effect ? 4th try: ( after calibre restart). 4th fail - time to give up & wait for help ![]() finaln thought - try to inspect the on-device copy of the book with calibre editor.... well that ddsocvers a new bug - calibre edito alwasy oens the same 1 of 3 books on device, no matter which one is highlighted - park that issue for later - try open with sigil instead.... well the changed CSS is in there: @page { margin-top: 10pts } body { orphans: 0; widows: 0 } maybe my eyes can't distinguish a 10pts top from a 5 pts. I suppose a retest with 25pts is called for.... no. the book is on the device, the 25pts code is in the book. but there is no visible extra space at top of pages Last edited by cybmole; 02-21-2014 at 08:52 AM. |
|
![]() |
![]() |
![]() |
#20 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 603
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
|
Quote:
Good to know that Kobo did made some changes to the left and right margins. I have not tested with 2.8+ firmware versions because I didn't expect Kobo to change it. The black area is the maximum available space to display text or can be controlled by user input. I agree the footer is the same size for kepub and epub. |
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
|
![]() |
![]() |
![]() |
#22 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
@page {margin-top: 10pt; margin-bottom: 0; margin-left: 0; margin-right: 0} i.e. pt singular, not pts plural Edit: Too slow! Geoff beat me to it |
|
![]() |
![]() |
![]() |
#23 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
If this is a problem for you, have you tried using the Modify Epub option, 'Modify @page and body margin styles'? You may need to revisit your calibre Prefs - Common Options - PageSetup - Margins settings before running it. I have all mine set to 'Unchanged' (which is not very descriptive). I think (needs testing) this option can remove html inline @page statements depending on your Prefs settings.
|
![]() |
![]() |
![]() |
#24 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
ok - take 6..... yes ! - predictably my top space now looks too big but I can press on, thanks |
|
![]() |
![]() |
![]() |
#25 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
ok - with the help from you all I have the @page changes nicely automated
is there any slick way to do something similar for fixed line heights ? they are a pain to do manually book by book: it's easy to miss one & they come both with & without closing ; so a simple regex will leave isolated ; in CSS file e.g. there can be any/all of line-height:1.2; line-height:1.2 line-height:1.2em; line-height:1.2em scattered through out the various css classes the calibre search & replace during conversion does not work for stylesheets Last edited by cybmole; 02-23-2014 at 03:50 AM. |
![]() |
![]() |
![]() |
#26 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 201
Karma: 42238
Join Date: Oct 2012
Device: Kobo: Glo, Aura , Aura H2O, Aura ONE, Forma, Elipsa
|
whilw we are at the topic of automating css-settings on transfer.
Anyone know a way to remove "text-align: left;" and "text-align:justify" and keep "text-align:center" automaticaly. |
![]() |
![]() |
![]() |
#27 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
If it helps, I think you could refine your regex search a bit like this: Code:
line-height:\s*1.2(em)?[;]? Also, another tip, if you open the epub in calibre Editor and pull up the css file and Beautify it (purple daisy in Code View toolbar in v1.25), the ';' separator is added to all attributes, even the last one in the list. So that would make for less guesswork. |
|
![]() |
![]() |
![]() |
#28 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31
Karma: 101916
Join Date: Nov 2013
Device: Kobo Aura HD
|
Quote:
And ewphoenix123, its quick to use the calibre editor search and replace in the stylesheets for text-align as well. Last edited by imkh; 02-23-2014 at 03:30 PM. |
|
![]() |
![]() |
![]() |
#29 |
Dead account. Bye
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
Hey guys, just a side note:
Widows and orphans are "broken" in kepubs. It doesn't matter what you set they are always disabled (like setting a 0 value). You can easily test yourselves... Last edited by arspr; 02-23-2014 at 04:37 PM. |
![]() |
![]() |
![]() |
#30 |
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
|
Or, due the large number of complaints about the text not filling the screen, Kobo decided not to support widows and orphans in their format. That is a reasonable decision on their part as they are the ones who own the format.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is it possible to completely remove the right and left margins? | tiramisù | Amazon Kindle | 103 | 05-04-2015 12:22 AM |
how to remove margins after converting mobi/ePub? | choychoydog | Conversion | 0 | 03-07-2013 12:02 AM |
How can I blank margins of picture batch remove? | asdas | Workshop | 2 | 07-11-2012 04:26 PM |
How to remove margins in Pdf? | ludo1980 | Amazon Kindle | 6 | 12-15-2010 07:19 PM |
remove pdf margins | Hanselda | Bookeen | 12 | 05-13-2009 08:30 AM |