![]() |
#106 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
Edit: Don't worry, I see the margins from the XPGT file are added to, rather than overriding, the @page margin from the CSS stylesheet, it is just that the ones I had tried all had very small margins set in the XPGT file so I didn't notice. Last edited by GeoffR; 11-01-2015 at 11:26 PM. |
|
![]() |
![]() |
![]() |
#107 |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
This .xpgt file is a terrible one.. puts almost a cm margins on all sides..
Even with @page { margin: 0.00em 0.00em 0.00em 0.00em!important; } in the normal .css it just overrides it.. Spoiler:
I have asked the maker from the KoboTouchExtended driver if he can make something to remove them while transferring a book,but that only works when sideloading.. i am in the hospital for 4 days a week, 8 hours a day so I buy many books... it isn't that simple to edit books in the hospital as i am limited to about 2 meters from the machine,when a patient is there that is wireless monitored there are no laptops allowed at all. So if it could be patched,it is great..because a very big part of all other epub related patches simply don't work when the xpgt file is present... (as in,when there are different margins set in it) In practice, almost 60% of Dutch ebooks are made by the same firm..who just put the file in it, the epub is made with workflow generated from word documents.. paragraps are like P1, p2, p3 so a .css file is very large because all margins are there for every p1,p2 etc... so if it is possible to patch it on the reader.. Last edited by Nick_1964; 11-02-2015 at 10:55 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#108 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
`Ignore ePub Adobe XPGT stylesheet (page-template.xpgt)`
Here is a patch to make the ePub reader ignore any Adobe XPGT stylesheets.
These stylesheets are commonly named page-template.xpgt and often contain page margins. The problem with them is that their margins are added to the @page margins set in the CSS stylsheet, but some readers ignore the XPGT stylesheet, so readers which notice the XPGT stylesheet will end up with larger margins than readers which don't. I can't find a clean way to prevent the XPGT stylesheet file being loaded, so this patch tries instead to prevent the contents from being recognised. A better approach would be to remove the XPGT stylesheet altogether before sideloading the ePub, which can be done easily using the Modify ePub plugin in Calibre, but the patch has the advantage that it should work with DRM ePubs too. Edit: But the Modify ePub plugin can also remove the margins from the XPGT stylesheet without removing the stylesheet altogether. I haven't tested this patch much, but it seems to work as I expect. It is a multi-version patch and should word with firmware 3.3.0 to 3.18.0, and maybe future firmware versions too. Paste into librmsdk.so.1.0.0.patch Spoiler:
Last edited by GeoffR; 11-10-2015 at 12:28 AM. Reason: But the Modify ePub plugin ... |
![]() |
![]() |
![]() |
#109 | |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
|
|
![]() |
![]() |
![]() |
#110 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
New `ePub fixed/adjustable top/bottom margins` patch
Here is a new `ePub fixed/adjustable top/bottom margins` patch if you want to try it out. The changes only affect the adjustable margins.
* The adjustable margin size is now calculated to quarter-pixel accuracy. This allows a closer match between the size of the adjustable top/bottom margins and the left/right margins set by the slider on the Glo/Aura and AuraHD/H2O/GloHD devices. (e.g. 30 quarter-pixels = 7.5px is a better approximation for 1% of the Glo's 758px screen width than 7px or 8px which could be set in the old patch.) * Option to subtract a fixed number of pixels from the adjustable top/bottom margin to compensate for the built-in top margin that can't be removed from normal reading mode (fullScreenReading=false) The old patch calculated the top/bottom margin as A * B where A is the size (in % of screen width) of the left/right margin set by the slider; and B the number of pixels (step-size) set in the patch. The new patch calculates the top/bottom margin as A * B / 4 - C (rounded towards zero, or set to zero if the result is negative) where A and B are as before but B in quarter-pixels; and C is the size of the device's built-in top margin (use zero for full-screen mode) set in the patch. As before, the final margins can be affected by the book's stylesheet. You might want to remove the body left/right margins set in the book's CSS stylesheet and any page margins set in the book's Adobe XPGT stylesheet. Firmware 3.18.0 only, paste into libnickel.so.1.0.0.patch: Spoiler:
Last edited by GeoffR; 11-10-2015 at 06:55 AM. Reason: corrected patch comments |
![]() |
![]() |
Advert | |
|
![]() |
#111 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15
Karma: 11514
Join Date: Jul 2013
Device: Kobo glo
|
Hi, guys. What should I do if I forgot to upgrade glo to 3.18 and patched it? Glo stucks at five black squares running around. PC not responding device/
|
![]() |
![]() |
![]() |
#112 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15
Karma: 11514
Join Date: Jul 2013
Device: Kobo glo
|
question is closed, I found how to hard reset (push light and power buttons together)
|
![]() |
![]() |
![]() |
#113 |
Enthusiast
![]() Posts: 42
Karma: 10
Join Date: Jan 2015
Device: Kobo Glo
|
Thanks!
I love my Kobo Glo, but detested the fact that searches default to the Bookstore!
|
![]() |
![]() |
![]() |
#114 |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
|
![]() |
![]() |
![]() |
#115 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,817
Karma: 68407974
Join Date: Dec 2011
Location: Australia
Device: Kobo Libra 2, iPadMini4, iPad4, MBP; support other Kobo/Kindles
|
Only if you're searching from the home page. If you search from the Library, it defaults to searching your library; and if you search from inside a book, it defaults to searching that book.
|
![]() |
![]() |
![]() |
#116 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
`ePub disable built-in body padding-bottom`
The built-in ePub stylesheet has the following line:
Code:
body { padding-bottom: %1em !important; } This has the effect of adding a blank line to the end of the chapter (assuming the book has been created in the normal way with files split at chapter boundaries), and if the last line of text in the chapter would have fallen on the last line of the page then it gets pushed to the next page. More than one line might get pushed to the next page if the book has widows/orphans set higher than 1, or perhaps in some other situations such as if the body font-size is larger than the paragraph font-size. The `ePub fixed/adjustable top/bottom margins` and `Enforce user line spacing and justification in ePubs` patches remove this line from the built-in stylesheet to make room for other things, but if you don't use those patches and want to prevent the last line of the chapter being pushed to the next page, then the following patch can be used to disable it: Multi-version patch, paste into libnickel.so.1.0.0.patch: Spoiler:
Edit: These screenshots show the last page(s) of an ePub chapter (with orphans:1;widows:1;) settings are unchanged except for the above patch: Unpatched: Patched: Last edited by GeoffR; 11-20-2015 at 12:42 AM. Reason: Added screenshots |
![]() |
![]() |
![]() |
#117 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Because of the padding patch, doesn't that cause the entire CSS to be ignored since it's now an error? Would it not be better to patch out the %1em to 0em and remove !important instead?
|
![]() |
![]() |
![]() |
#118 |
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
|
No, the errors that cause problems are in structure. Adding an unknown attribute shouldn't cause a problem. Plus, the way firmware will apply this CSS is different to the in-book stylesheets, so errors in either are unlikely to cause a problem in the other. And finally, by renaming the attribute, the "!important" will mean any padding-bottom in the book won't be overridden.
|
![]() |
![]() |
![]() |
#119 |
Enthusiast
![]() Posts: 42
Karma: 10
Join Date: Jan 2015
Device: Kobo Glo
|
|
![]() |
![]() |
![]() |
#120 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 70
Karma: 798
Join Date: Apr 2012
Device: iLiad, Kobo Aura 6"
|
i have enabled the "Custom page refresh options (1,2,4,8,16,32,64)" but it doesn't work on my Aura 3.18. it still has only "1,5,10,Chapter"
Code:
$ ./3.18.0.sh Extracting files to patch from 3.18.0_source/kobo-update-3.18.0.zip ... ./usr/local/Kobo/libnickel.so.1.0.0 ./usr/local/Kobo/librmsdk.so.1.0.0 ./usr/local/Kobo/libadobe.so Read 14739440 bytes from input file '/tmp/patch32lsb_UjxSGdxq/original/./usr/local/Kobo/libnickel.so.1.0.0' Ignoring disabled patch `Disable reading footer` find_base_address: unique string at 00C2E1D0 find_base_address: unique string at 00C2E2F4 Applied patch `Custom reading footer style` Ignoring disabled patch `My 10 line spacing values` Ignoring disabled patch `My 15 line spacing values` Ignoring disabled patch `Custom left & right margins` Ignoring disabled patch `Custom font sizes` Applied patch `Brightness fine control` Applied patch `Search in Library by default` Ignoring disabled patch `Freedom to advanced fonts control` Ignoring disabled patch `Allow download all in Browser` Ignoring disabled patch `ePub fixed/adjustable top/bottom margins` Ignoring disabled patch `Custom page refresh options (1,2,3,...,12)` Applied patch `Custom page refresh options (1,2,4,8,16,32,64)` Ignoring disabled patch `Remove system fonts in Reader list` Ignoring disabled patch `Remove non-system fonts in Reader list` Ignoring disabled patch `Cyrillic keyboard` Ignoring disabled patch `Arabic keyboard` Ignoring disabled patch `Hebrew keyboard` Ignoring disabled patch `Turkish keyboard` Ignoring disabled patch `Customise PinchGestureRecognizer` Ignoring disabled patch `Margins fine tuning` Ignoring disabled patch `Custom kepub default margins` Ignoring disabled patch `Block WiFi firmware upgrade` Ignoring disabled patch `Compact homepage layout (Glo only)` Ignoring disabled patch `Compact homepage layout (Aura only)` Ignoring disabled patch `Remove white borders from homescreen tile book covers` find_base_address: unique string at 00B86534 Applied patch `Custom footer` Ignoring disabled patch `Custom Sleep/Power-off timeouts` Ignoring disabled patch `Set kepub hyphenation` Ignoring disabled patch `Fix kepub side bearing font cut-off bug` Ignoring disabled patch `KePub zero body margin/padding` Ignoring disabled patch `Force user line spacing in KePubs` Ignoring disabled patch `Enforce user line spacing and justification in ePubs` Ignoring disabled patch `Force user line spacing in ePubs (part 1 of 2)` Ignoring disabled patch `ePub fixed font sharpness` Ignoring disabled patch `KePub fixed font sharpness` Ignoring disabled patch `Un-force font-family override p tags (std epubs)` Ignoring disabled patch `Un-Force user text-align in div,p tags in KePubs` Applied patch `Disable pinch-to-zoom font resizing` Applied patch `Always display chapter name on navigation menu` Ignoring disabled patch `Change dicthtml strings to micthtml` Wrote 14739440 bytes to output file '/tmp/patch32lsb_UjxSGdxq/patched/./usr/local/Kobo/libnickel.so.1.0.0' Read 258304 bytes from input file '/tmp/patch32lsb_UjxSGdxq/original/./usr/local/Kobo/libadobe.so' Ignoring disabled patch `Remove PDF map widget shown during panning` Ignoring disabled patch `Preserve PDF pan position across page turns` Ignoring disabled patch `Remove PDF page turn arrows at left and right edges of page` Wrote 258304 bytes to output file '/tmp/patch32lsb_UjxSGdxq/patched/./usr/local/Kobo/libadobe.so' Read 7437684 bytes from input file '/tmp/patch32lsb_UjxSGdxq/original/./usr/local/Kobo/librmsdk.so.1.0.0' Applied patch `Fix page breaks bug` Ignoring disabled patch `Default ePub monospace font (Courier)` Ignoring disabled patch `Default ePub sans-serif font (Gill Sans)` Ignoring disabled patch `Force user line spacing in ePubs (Part 2 of 2)` Ignoring disabled patch `Ignore book internal CSS stylesheet` Ignoring disabled patch `Ignore book TOC navpoints` Wrote 7437684 bytes to output file '/tmp/patch32lsb_UjxSGdxq/patched/./usr/local/Kobo/librmsdk.so.1.0.0' Creating KoboRoot.tgz ... ./usr/local/Kobo/libnickel.so.1.0.0 ./usr/local/Kobo/libadobe.so ./usr/local/Kobo/librmsdk.so.1.0.0 Cleaning up /tmp/patch32lsb_UjxSGdxq |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |