Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-30-2015, 02:31 PM   #91
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Percivale View Post
Dear owners of H2O

Can you please sugguest the optimum values for the patch in order to have as little footer and header as possible?

I am a rookie in this field and I am a liitle lost. On the other hand I would not like to experiment knowing that there is a slight risk of blocking my reader.

I will be very grateful for any help.
Have a look at the image I've attached. You'll see how close the text can get the the footer using the following patch setting for 3.18.0.

Code:
<Patch>
patch_name = `Custom reading footer style`
patch_enable = `yes`
# Multi-version patch: 3.15.0 - 3.18.0+
#
# This patch customises the following properties of the reading footer:
#
#  * Footer height (the amount of the screen reserved for the footer.)
#  * Caption font size (Caption = page number or other progress indicator)
#  * Caption top margin, which changes its vertical position within the footer.
#
# When editing the replacement values below, BE CAREFUL NOT TO CHANGE THE LENGTH
# OF THE REPLACEMENT STRING! If a replacement string is too long you will get
# an error when making the patch, but if one is too short then there will be no
# error, but strange things will happen to the reading footer.
#
find_base_address = `ReadingFooter {\n\tmin-height: 70px;`
#
# Replacement footer height values: Touch/Mini
replace_string = 0011, `min-height: 70px;`, `min-height: 32px;`
replace_string = 0024, `max-height: 70px;`, `max-height: 32px;`
# Replacement footer height values: Glo/Aura
replace_string = 0085, `min-height: 82px;`, `min-height: 40px;`
replace_string = 0098, `max-height: 82px;`, `max-height: 40px;`
# Replacement footer height values: AuraHD/H2O/GloHD
replace_string = 00DA, `min-height: 120px;`, `min-height: 030px;`
replace_string = 00EE, `max-height: 120px;`, `max-height: 030px;`
#
#
find_base_address = `#caption {\n\tfont-size: 16px;`
Replace_string = 0000, `#caption {\n\tfont-size: 16px;\n}\n\n#caption[qApp_deviceIsPhoenix="true"] {\n\tfont-size: 20px;\n}\n\n#caption[qApp_deviceIsDragon="true"] {\n\tfont-size: 26px;\n}\n\n#caption[qApp_deviceIsAlyssum="true"] {\n\tfont-size: 30px;\n}\n\n#caption[qApp_localeName="ja_JP"] {\n\tfont-family: Sans-SerifJP;\n}`, `#caption {font-size: 16px;margin-top: 00px;}\n#caption[qApp_deviceIsPhoenix="true"] {font-size: 20px;}\n#caption[qApp_deviceIsDragon="true"] {font-size: 26px;}\n#caption[qApp_deviceIsAlyssum="true"] {font-size: 30px;}\n#caption[qApp_localeName="ja_JP"] {font-family: Sans-SerifJP;}`
#
# Replacement caption font size value for Touch/Mini:
replace_string = 000A, `font-size: 16px;`, `font-size: 16px;`
# Replacement caption font size value for Glo/Aura:
replace_string = 0054, `font-size: 20px;`, `font-size: 20px;`
# Replacement caption font size value for AuraHD/H2O:
replace_string = 008C, `font-size: 26px;`, `font-size: 26px;`
# Replacement caption font size value for GloHD:
replace_string = 00C5, `font-size: 30px;`, `font-size: 30px;`
#
# Replacement caption top margin value for all devices:
# (A negative top margin moves the caption text upwards,
# further from the bezel and closer to the page content.)
replace_string = 001A, `margin-top: 00px;`, `margin-top:-10px;`
#
# Uncomment to use a fixed replacement caption font family, for all devices:
# (You can change Avenir to another font name of your choice, but Avenir or
# Georgia are recommended because other fonts may not be loaded when the book
# is first opened and so might cause problems. Unlike other strings it is OK
# if this replacement string is a bit longer or shorter than the original.)
#replace_string = 00D7, `#caption[qApp_localeName="ja_JP"] {font-family: Sans-SerifJP;}`, `#caption {font-family: Avenir;}
</Patch>


<Patch>
patch_name = `Custom footer`
patch_enable = `yes`
# Multi-version patch: 2.8.1 - 3.18.0+
#
# Changes the footer text with something shorter
# (not sure how it affects translations)
#
find_base_address = `Page %1 <i>of</i> %2`
replace_string = 0000, `Page %1 <i>of</i> %2`, `%1 / %2`
</Patch>
Attached Thumbnails
Click image for larger version

Name:	H2OFooter.jpg
Views:	627
Size:	1.18 MB
ID:	143314  

Last edited by JSWolf; 10-30-2015 at 02:39 PM.
JSWolf is offline   Reply With Quote
Old 10-30-2015, 05:03 PM   #92
Percivale
Connoisseur
Percivale began at the beginning.
 
Posts: 50
Karma: 10
Join Date: Oct 2015
Device: none
@JSWolf



However, I inserted even lower values in max-height: instead of 030px;`I wrote 026px
In `margin-top:-10px;`I put -08px
Someone from another forum suggested these figures. And it really minimized the footnote very well - probably more than you did.

I hope, one day someone (from Kobo) will resolve the issue with the unnecessary header.

Is it possible to change the values after applying the patch?

P.S. I admire your ability to enjoy reading with such a tiny font
Percivale is offline   Reply With Quote
Advert
Old 10-30-2015, 05:16 PM   #93
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,535
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
You would have to reapply the patch with updated values; there is no means to override it on the device itself.
PeterT is offline   Reply With Quote
Old 10-30-2015, 06:43 PM   #94
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by JSWolf View Post
Have a look at the image I've attached. You'll see how close the text can get the the footer using the following patch setting for 3.18.0.
Spoiler:

Code:
<Patch>
patch_name = `Custom reading footer style`
patch_enable = `yes`
# Multi-version patch: 3.15.0 - 3.18.0+
#
# This patch customises the following properties of the reading footer:
#
#  * Footer height (the amount of the screen reserved for the footer.)
#  * Caption font size (Caption = page number or other progress indicator)
#  * Caption top margin, which changes its vertical position within the footer.
#
# When editing the replacement values below, BE CAREFUL NOT TO CHANGE THE LENGTH
# OF THE REPLACEMENT STRING! If a replacement string is too long you will get
# an error when making the patch, but if one is too short then there will be no
# error, but strange things will happen to the reading footer.
#
find_base_address = `ReadingFooter {\n\tmin-height: 70px;`
#
# Replacement footer height values: Touch/Mini
replace_string = 0011, `min-height: 70px;`, `min-height: 32px;`
replace_string = 0024, `max-height: 70px;`, `max-height: 32px;`
# Replacement footer height values: Glo/Aura
replace_string = 0085, `min-height: 82px;`, `min-height: 40px;`
replace_string = 0098, `max-height: 82px;`, `max-height: 40px;`
# Replacement footer height values: AuraHD/H2O/GloHD
replace_string = 00DA, `min-height: 120px;`, `min-height: 030px;`
replace_string = 00EE, `max-height: 120px;`, `max-height: 030px;`
#
#
find_base_address = `#caption {\n\tfont-size: 16px;`
Replace_string = 0000, `#caption {\n\tfont-size: 16px;\n}\n\n#caption[qApp_deviceIsPhoenix="true"] {\n\tfont-size: 20px;\n}\n\n#caption[qApp_deviceIsDragon="true"] {\n\tfont-size: 26px;\n}\n\n#caption[qApp_deviceIsAlyssum="true"] {\n\tfont-size: 30px;\n}\n\n#caption[qApp_localeName="ja_JP"] {\n\tfont-family: Sans-SerifJP;\n}`, `#caption {font-size: 16px;margin-top: 00px;}\n#caption[qApp_deviceIsPhoenix="true"] {font-size: 20px;}\n#caption[qApp_deviceIsDragon="true"] {font-size: 26px;}\n#caption[qApp_deviceIsAlyssum="true"] {font-size: 30px;}\n#caption[qApp_localeName="ja_JP"] {font-family: Sans-SerifJP;}`
#
# Replacement caption font size value for Touch/Mini:
replace_string = 000A, `font-size: 16px;`, `font-size: 16px;`
# Replacement caption font size value for Glo/Aura:
replace_string = 0054, `font-size: 20px;`, `font-size: 20px;`
# Replacement caption font size value for AuraHD/H2O:
replace_string = 008C, `font-size: 26px;`, `font-size: 26px;`
# Replacement caption font size value for GloHD:
replace_string = 00C5, `font-size: 30px;`, `font-size: 30px;`
#
# Replacement caption top margin value for all devices:
# (A negative top margin moves the caption text upwards,
# further from the bezel and closer to the page content.)
replace_string = 001A, `margin-top: 00px;`, `margin-top:-10px;`
#
# Uncomment to use a fixed replacement caption font family, for all devices:
# (You can change Avenir to another font name of your choice, but Avenir or
# Georgia are recommended because other fonts may not be loaded when the book
# is first opened and so might cause problems. Unlike other strings it is OK
# if this replacement string is a bit longer or shorter than the original.)
#replace_string = 00D7, `#caption[qApp_localeName="ja_JP"] {font-family: Sans-SerifJP;}`, `#caption {font-family: Avenir;}
</Patch>


<Patch>
patch_name = `Custom footer`
patch_enable = `yes`
# Multi-version patch: 2.8.1 - 3.18.0+
#
# Changes the footer text with something shorter
# (not sure how it affects translations)
#
find_base_address = `Page %1 <i>of</i> %2`
replace_string = 0000, `Page %1 <i>of</i> %2`, `%1 / %2`
</Patch>

Even with the same values, I don't come as near as you with the glo hd.. strange.. there is always almost 8 mm between the last line of text and the page xx of xx with my Glo-HD,it must be the higher resolution... (no there is no page margin or bottom margin present in the ebooks..)

Last edited by Nick_1964; 10-30-2015 at 06:52 PM.
Nick_1964 is offline   Reply With Quote
Old 10-30-2015, 07:37 PM   #95
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by Nick_1964 View Post
[/spoiler]
Even with the same values, I don't come as near as you with the glo hd.. strange.. there is always almost 8 mm between the last line of text and the page xx of xx with my Glo-HD,it must be the higher resolution... (no there is no page margin or bottom margin present in the ebooks..)
The patch values determine how close it is possible for the text to get to the page number, but how close it actually gets depends on all the other settings: your choice of font, font size, line spacing on the device.

If you want to see how close the text can get to the page number, load this Margin test ePub, on the first page it will draw a rectangle as big as possible on the screen, which will let you see how much space the reading footer is using. If your text is not getting as close to the page number as this rectangle does, then it is because of your choice of font and other settings, or something in the books.

See the screenshots at the bottom of this post for more info.

Last edited by GeoffR; 10-30-2015 at 07:39 PM. Reason: See the screenshots ...
GeoffR is offline   Reply With Quote
Advert
Old 10-31-2015, 08:19 AM   #96
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by GeoffR View Post
The patch values determine how close it is possible for the text to get to the page number, but how close it actually gets depends on all the other settings: your choice of font, font size, line spacing on the device.

If you want to see how close the text can get to the page number, load this Margin test ePub, on the first page it will draw a rectangle as big as possible on the screen, which will let you see how much space the reading footer is using. If your text is not getting as close to the page number as this rectangle does, then it is because of your choice of font and other settings, or something in the books.

See the screenshots at the bottom of this post for more info.
Then it must be something as font because with the test epub it is drawn completely to the bottom.. but how to figure out.. there are no margins,I use all kind of extra settings with the !important flag and the epub patch for bottom and top patches..

From my config file:
readingFontFamily=Malabar
readingFontSize=20
readingLeftMargin=0
readingLineHeight=0.85
readingMenuState=
readingRightMargin=0
showPageHeader=false

Well 8 mm is over reacted.. 4 or 5..

Click image for larger version

Name:	screen_001.png
Views:	552
Size:	11.0 KB
ID:	143335

Test screen

Click image for larger version

Name:	screen_002.png
Views:	595
Size:	182.7 KB
ID:	143336

Book.
Nick_1964 is offline   Reply With Quote
Old 10-31-2015, 04:08 PM   #97
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Percivale View Post
@JSWolf



However, I inserted even lower values in max-height: instead of 030px;`I wrote 026px
In `margin-top:-10px;`I put -08px
Someone from another forum suggested these figures. And it really minimized the footnote very well - probably more than you did.

I hope, one day someone (from Kobo) will resolve the issue with the unnecessary header.

Is it possible to change the values after applying the patch?

P.S. I admire your ability to enjoy reading with such a tiny font
I've tried your values and I find they don't work for me. The footer is hitting the very bottom of the screen and the numbers are slightly not fully formed. I'll go back to my numbers.
JSWolf is offline   Reply With Quote
Old 10-31-2015, 08:24 PM   #98
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by Nick_1964 View Post
Then it must be something as font because with the test epub it is drawn completely to the bottom.. but how to figure out.. there are no margins,I use all kind of extra settings with the !important flag and the epub patch for bottom and top patches..
It is simply that the gap is not big enough for another line of text with your current font, font size, and line spacing settings. From your screenshots I measure that your line height is 44px, but the gap at the bottom is only 38px. (Edit actually 34px, see below.)

You either need to make the footer 6 pixels (Edit actually 10px, see below) smaller (which means reducing the font size used in the footer), or change the font size and line spacing settings of the text (which might mean more or fewer lines on the page), or add a few pixels to the @page top margin, which will shift all the text down the page by a few pixels. (Edit: e.g. if you made the @page top margin 11px then the gap at the top of the page would increase from 15px to 26px, and the gap at the bottom would reduce from 38px to 27px.)


Edit: Here is a way of thinking about it that might be simpler, as you don't need to measure anything from screenshots:

Your total screen height is 1448px. There is a built-in top margin of 15px that we can do nothing about (except switch to full-screen mode), and you have set your footer to a height of 35px, which leaves a usable screen height of 1448-15-35 = 1398px.

Your choice of font, font size and line spacing results in a total line height of 44px, so you can fit 1398\44 = 31 lines on the screen leaving a gap of 1398-31*44 = 34px.

(I measured 38px from the screenshot, but some fonts include white space at top or bottom so it is hard to tell where to measure from, this method should be more accurate.)

So to get another line of text at your currentsettings you would need to reduce your footer height by 10px to 25px. (or 24px, to allow for possible rounding in how the margins are calculated.)

Or, you could increase either line spacing or font size so that your line height was 45px, and that would still give you 31 lines of text, but with a much smaller gap at the bottom: 1398-31*45 = 3px. (You will need to apply the `Custom font sizes` patch to allow a 1px adjustment at that size.)

If you keep the footer height at 35px and adjust your font size and/or line spacing to change the line height (currently 44), then this table shows the number of lines of text that will fit on a page, and the size of the bottom gap (in pixels.):
Code:
Line height   40   41   42   43   44   45   46   47   48
--------------------------------------------------------
Lines/page    34   34   33   32   31   31   30   29   29
Bottom gap    38   04   12   22   34   03   18   35   06

Last edited by GeoffR; 11-01-2015 at 01:58 AM. Reason: Here is a way of thinking about it
GeoffR is offline   Reply With Quote
Old 11-01-2015, 06:43 AM   #99
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Wow.. that is just a hell of a text you wrote,but it makes all perfectly clear (maybe you have to shift it to your metazoa patches topic)
But, my reader is set for "night modus",when I am tired, so I take a bit of a larger font for comfort.
And the effect of adding something to top margin only shift everything more to the bottom so I am only doing cosmetics but fool myself,yes it shift to the bottom,but it doesn't put more lines on it.
I now understand why with a lot of books at the beginning of the chapter,the txt is almost shifted to the footer, it is just because they put in a margin at top.
When I changes the values of the footer patch from 35 to 25 it cuts off the top of the page xx of xx txt a bit.. because i made that txt a little bit bigger..

So i think that in balance of reading comfort,font,the footer txt i can't squeeze more out of it without offering something of that comfort.
I do bookmark everything you say ( I have a favorite part called geoffr in my list with your tips) .

Stumbled into another problem.
I use the extra .css option with the following rules ( i like it to have a few mm from left and right bezel..)
I have enabled your "ePub fixed/adjustable top/bottom margins" patch.
Set the values to zero.
3.17.3
Spoiler:

<Patch>
patch_name = `ePub fixed/adjustable top/bottom margins`
patch_enable = `yes`
#
# This patch sets the @page margin sizes in epubs, overriding any @page margin
# set in the book's stylesheet.
#
# By default the top and bottom margins are set to be adjustable, their size
# similar to the left/right margin size set by the adjustment slider. There
# are options to set the top and/or bottom margin to a fixed size instead.
#
# Note that this patch has the side-effect of removing the body bottom padding
# from the built-in stylesheet, which means that there will no longer be a line
# of padding added automatically at the end of chapters.
#
# getReadingLineHeight(...) --> getReadingLeftMargin(...)
replace_bytes = 459858, B6 F7 B8 EE, 9A F7 14 EE
# QString.arg(double, ...) --> QString.arg(int64, ...)
replace_bytes = 45985C, 20 22 4F F0 FF 33, 20 21 01 22 0A 23
replace_bytes = 459866, AD F8 04 20 00 93, 02 91 42 43 01 93
replace_bytes = 459870, 00 22 67 23 A5 F7 80 E9, 00 23 00 93 9A F7 DA E9
# padding-bottom: %1em !important;\n
# --> }@page{margin:%1px 0 %1px 0}body{
replace_string = B4C6BE, `p\0a\0d\0d\0i\0n\0g\0-\0b\0o\0t\0t\0o\0m\0:\0 \0%\01\0e\0m\0 \0!\0i\0m\0p\0o\0r\0t\0a\0n\0t\0;\0\n\0`, `}\0@\0p\0a\0g\0e\0{\0m\0a\0r\0g\0i\0n\0:\0%\01\0p \0x\0 \00\0 \0%\01\0p\0x\0 \00\0}\0b\0o\0d\0y\0{\0`
#
# Optional replacement value: Uncomment for a FIXED TOP MARGIN size in px,
# default 25px. Replacement value is margin size, two digits separated by \0
# (Leave commented out for an adjustable top margin.)
replace_string = B4C6DA, `%\01`, `0\00`
#
# Optional replacement value: Uncomment for a FIXED BOTTOM MARGIN size in px,
# default 00px. Replacement value is margin size, two digits separated by \0
# (Leave commented out for an adjustable bottom margin.)
replace_string = B4C6E8, `%\01`, `0\00`
#
# Replacement value: Sets the value of the ADJUSTABLE top/bottom margin (if any)
# to a multiple of readingLeftMargin, in pixels. Suggested values are:
# Normal reading mode: 5px (Touch/Mini), 6px (Glo/Aura), 8px (AuraHD/H2O/GloHD)
# Full-screen mode: 6px (Touch/Mini), 7px (Glo/Aura), 10px (AuraHD/H2O/GloHD)
replace_int = 45985E, 1, 6
</Patch>

in the extra .css the following rules:
Code:
body, body.calibre {
  margin-left:0.1em!important;
  margin-right:0.1em!important;
  padding-left:0!important;
  padding-right:0!important;
    widows:1;
  orphans:1;
  }
  
 @page { margin: 0.00em 0.00em 0.00em 0.00em!important; }
 
 body,div,p {
 hyphens: none !important;
 adobe-hyphenate: none !important;
 -webkit-hyphens: none !important;
}
But a book I am currently reading looks like this:
Click image for larger version

Name:	screen_002.png
Views:	561
Size:	143.8 KB
ID:	143352

Tried and tried... nothing works..
Later I found out that there is also an page-template.xpgt
So I guess everything patched in the reader, every extra rule with !important added to css will be overruled by the settings in misc: page-template.xpgt ??

So at the end the publishers force me to still edit the book.
Can u confirm that this page-template.xpgt overrides the ePub fixed/adjustable top/bottom margins patch, and the !important stuff in the normal .css ??
Nick_1964 is offline   Reply With Quote
Old 11-01-2015, 07:04 AM   #100
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You can use the Modify ePub plugin to get rid of page-template.xpgt without having to edit the ePub. However, using the eBook editor is also very simple to use to get rid of files you don't want.
JSWolf is offline   Reply With Quote
Old 11-01-2015, 08:09 AM   #101
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by JSWolf View Post
You can use the Modify ePub plugin to get rid of page-template.xpgt without having to edit the ePub.
I know the plugin.. I am a lot in the hospital and have to buy a lot of books online..at the hospital I have my tablet, works fine with a usb otg cable but there is no android epub editor.. so I try to solve as much as possible with the reader itself.. I am not always in the possibility to use a computer and on the computer i sometimes forgot it.

(the only way to do it now is use the OTG cable on my tablet, open total commander for android,rename the epub as zip,unzip it,edit the css, zip it again,rename it to epub and put it back on the reader,but then the reader sees it as a new book,totally forgot where i was on which page..)
I try to "automate" as many tasks as I can do.

For the books I can edit it is good to know,like I asked, does a page-template.xpgt always override any settings.. ?
There are now so many points I have to look for while editing..
it would be nice if the normal or extended driver has an option to remove the xpgt files while transferring,because I do forgot it... that is still not possible while in the hospital...
(flat liner,reanimated,total kidney failure so every 2 days for 8 hours of dialysis in hospital.. I read one book every 3 hours so I always have about 20 fresh ones..but still must edit them..)
Nick_1964 is offline   Reply With Quote
Old 11-01-2015, 08:16 AM   #102
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
There is one suggestion, get a Windows based tablet. Then you can run Calibre to do all you need with your eBooks.
JSWolf is offline   Reply With Quote
Old 11-01-2015, 09:49 PM   #103
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
From what I gather, the page-template.xpgt will override anything in the CSS stylesheet.

I don't know much about the page-template.xpgt, my early experience was that it never made the book look better and sometimes made it look a lot worse, so I always strip it using the Modify ePub plugin at the same time I strip all the other useless crap like DRM tags, iTunes files, Javascript, etc.

It might be possible to make a patch so that the styles in the page-template.xpgt are ignored, but I would have to learn more about it first.
GeoffR is offline   Reply With Quote
Old 11-01-2015, 10:19 PM   #104
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,535
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by GeoffR View Post

It might be possible to make a patch so that the styles in the page-template.xpgt are ignored, but I would have to learn more about it first.
Probably by just patching the page-template.xpgt string in nickel or one of the libraries one could ignore all entries in the page-template file.
PeterT is offline   Reply With Quote
Old 11-01-2015, 10:48 PM   #105
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by PeterT View Post
Probably by just patching the page-template.xpgt string in nickel or one of the libraries one could ignore all entries in the page-template file.
page-template.xpgt is a common name for it, but like the CSS stylesheet it can have any name.

It is referenced from the html in the same way as a CSS stylesheet:
Code:
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="page-template.xpgt"/>
There is already a patch that blocks the book's stylesheet, but it blocks both the CSS and XPGT stylesheets, so isn't much use to most people.
GeoffR is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Instructions for patching firmware 3.15.0 GeoffR Kobo Developer's Corner 146 05-24-2016 06:10 AM
Instructions for patching firmware 3.17.3 GeoffR Kobo Developer's Corner 60 09-17-2015 05:35 PM
Instructions for patching firmware 3.17.0 GeoffR Kobo Developer's Corner 49 08-16-2015 05:20 AM
Instructions for patching firmware 3.16.10 GeoffR Kobo Developer's Corner 12 08-14-2015 03:40 AM
Instructions for patching firmware 3.3.x, 3.4.x, 3.5.x GeoffR Kobo Developer's Corner 285 08-27-2014 10:06 AM


All times are GMT -4. The time now is 07:10 PM.


MobileRead.com is a privately owned, operated and funded community.