Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 12-06-2013, 08:16 AM   #1
treadlightly
Wizard
treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.
 
treadlightly's Avatar
 
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.
treadlightly is offline   Reply With Quote
Old 12-06-2013, 08:41 AM   #2
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,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.
PeterT is offline   Reply With Quote
Advert
Old 12-06-2013, 01:10 PM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,451
Karma: 167726581
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by treadlightly View Post
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.
Assuming that the epub is not DRMed, I tend to do the following when I get a new epub file.

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
DNSB is offline   Reply With Quote
Old 12-06-2013, 01:40 PM   #4
treadlightly
Wizard
treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.treadlightly ought to be getting tired of karma fortunes by now.
 
treadlightly's Avatar
 
Posts: 1,370
Karma: 6957792
Join Date: Nov 2010
Location: Ottawa, ON
Device: Kobo H2O
Quote:
Originally Posted by DNSB View Post
Assuming that the epub is not DRMed, I tend to do the following when I get a new epub file.
Thank you! I will be sure to find and delete the reference to the files - I think that is what I was missing.
treadlightly is offline   Reply With Quote
Old 12-07-2013, 08:36 PM   #5
Antioch
Connoisseur
Antioch began at the beginning.
 
Posts: 79
Karma: 10
Join Date: Jun 2011
Device: Nook STR, Kobo Aura H2O, Kobo Libra 2
Quote:
Originally Posted by DNSB View Post
Assuming that the epub is not DRMed, I tend to do the following when I get a new epub file.

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.
Can you configure the Kobo Extender Driver for Calibre to do this?
Antioch is offline   Reply With Quote
Advert
Old 12-07-2013, 08:58 PM   #6
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Antioch View Post
Can you configure the Kobo Extender Driver for Calibre to do this?
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.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 07:37 AM.


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