![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,370
Karma: 6957792
Join Date: Nov 2010
Location: Ottawa, ON
Device: Kobo H2O
|
Removing margin settings from epub
I'm trying to remove any margin settings in my epub files in order to use the margin sliders on the Glo. I have the patcher installed with "custom left/right margins" patch enabled. At first I thought the "ignore book css" patch would be a godsend but quickly learned why the css experts here said it was like using a sledgehammer to drive a thumbtack.
I would prefer to edit the epub directly so as not to have duplicate files in my Calibre library. I used Sigil on a few, changed all margins to 0 in the css stylesheet and everything was good. I then encountered an epub where that didn't work, and some poking around revealed a .xpgt file with margin settings. Does Kobo use this to display the epub? Would I set the single_column margin settings to 0? Deleting all these page-master references caused a corrupted database went I sent the epub to the device, so I'm a bit leery to mess with this file now. I downloaded a fresh epub file and used Modify Epub and checked "Remove margins from Adobe .xpgt files" which had the desired effect, but that plugin does create a backup epub. I'd really like to learn to use Sigil to do this. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,262
Karma: 78869092
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Remember it is VERY easy to have calibre remove the backup copy from the library.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,451
Karma: 167726581
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Using Sigil, I do a search for lines similar to "<link href="../Misc/page-template.xpgt" rel="stylesheet" type="application/adobe-page-template+xml" />" and replace it with nothing. Then I open the Misc container and delete the xpgt file. I check the contents of the page_styles.css file. If it is simply setting top and bottom margins, repeat the above for the lines referencing the page_styles.css and delete that file from the Styles container. I then do quite a bit of cleanup on the stylesheet css file pretty much replacing it's contents with my personalized one. This is not always needed depending on how the epub looks but the search and replace takes about 15-20 minutes on the average. The only epub where I found the page-template.xpgt of use was also the only epub I've seen that used double columns. Regards, David |
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,370
Karma: 6957792
Join Date: Nov 2010
Location: Ottawa, ON
Device: Kobo H2O
|
|
![]() |
![]() |
![]() |
#5 | |
Connoisseur
![]() Posts: 79
Karma: 10
Join Date: Jun 2011
Device: Nook STR, Kobo Aura H2O, Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
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
|
There is nothing in the extended driver to do this. You could ask if it could be added in the thread for the driver. But, odds are you want it removed for all ereaders/uses. The Modify ePub plugin already does it, or do the manual edit as described if you want to make other changes to the epub.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kobo Glo losing margin settings | antonf | Kobo Reader | 1 | 02-07-2013 05:01 PM |
removing top margin/header/border with sigil genereated epub | jezzad | ePub | 9 | 03-16-2012 03:35 PM |
Removing Font and Margin Overrides | anamardoll | ePub | 13 | 06-09-2011 07:32 PM |
Changing Margin Settings to use full width of the Screen??? | JBlyth | Kobo Reader | 9 | 07-05-2010 09:54 AM |
Quick question! margin settings? | nick_f | Sony Reader | 15 | 02-20-2009 02:15 PM |