Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 04-23-2013, 04:18 PM   #1
mart1984
Junior Member
mart1984 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2013
Device: Pocketbook Touch
Question epub to epub for padding removal

Hello all,

I have trouble with my ebook reader when any padding information is included in the epub document. WHen "padding" is included it ignores any "margin" information. Unfortunately most of my epub's include "padding-top/bottom:0;" in .calbre and so all the margins are shown as 0. Drives me crazy

So I thought to reconvert all my epubs to epub using calibre with the style info "padding" option activated.

Ok, then it removes "padding-top/bottom:0;" in .calibre but includes it in .calibre1 which is used for standard formatting. Great .

Original:
Quote:
.calibre {
font-size: 1em;
margin-bottom: 0.5em;
margin-top: 0.5em;
padding-bottom: 0;
padidng-top: 0
}
.calibre1 {
font-size: 2em;
margin-bottom: 1em;
margin-top: 1em;
}
Converted:
Quote:
.calibre {
display: block;
font-size: 1em;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
text-align: justify
}
.calibre1 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0.5em;
margin-left: 0;
margin-right: 0;
margin-top: 0.5em;
padding-bottom: 0;
padding-top: 0;
text-indent: 0.5em
}
To put it short: How do I get rid of any padding info in the stylesheet?

Thanks for any help...


Mart


PS: I tried "Other CSS options" already, even tried different output format (at least: Generic, Pocketbook 900, Sony xxx 300). I try to avoid changing all my ebooks by hand, that would be something for next winter...
mart1984 is offline   Reply With Quote
Old 04-24-2013, 07:24 AM   #2
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Quote:
Originally Posted by mart1984 View Post
I have trouble with my ebook reader when any padding information is included in the epub document. WHen "padding" is included it ignores any "margin" information.
This does sound very odd behaviour for a reader. Is it a known problem with the Pocketbook Touch?

One simple way is to edit the stylesheet/s using the Tweak Book function in calibre. You don't need to do a conversion first, but be sure to take a backup of your book before tweaking it.

I realise that this is 'changing by hand' but it is quite straightforward.
Agama is offline   Reply With Quote
Advert
Old 04-24-2013, 10:17 AM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Since you obviously are aware of what a stylesheet can do, I would use Agama's advice.

I also find it odd that a device FAILS on valid styling. Ignore is permissable

Code:
padding: 0
is the short form for set all padding to 0
theducks is offline   Reply With Quote
Old 04-24-2013, 01:01 PM   #4
mart1984
Junior Member
mart1984 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2013
Device: Pocketbook Touch
Quote:
Originally Posted by Agama View Post
This does sound very odd behaviour for a reader. Is it a known problem with the Pocketbook Touch?
Don't know yet. I thought it would be easier to get rid of the padding by calibre. Then I could have changed the margin in the same concersion.
I'll ask in the pocketbook forum later.

Quote:
Originally Posted by theducks View Post
I also find it odd that a device FAILS on valid styling. Ignore is permissable
It looks (after some more tests) that Pocketbook Touch is IGNORING "margin" setting when "padding" setting is done. Also some kind of ignoring .

Code:
padding-top: 0; margin-top:0.5em;
With this it sets the distance to 0 instead of 0.5em.

Based on my (limited) stylesheet knowledge that should not happen.


Thanks for your help.
mart1984 is offline   Reply With Quote
Old 04-25-2013, 07:51 AM   #5
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Perhaps you could make a one page ePub which demonstrates the problem, with screen shots showing how your reading displays margins without padding specified and then with padding specified. I'm just wondering if a bit more context may help give some insight into what's going on here - hence posting a full ePub rather than just code snippets.

I'm still surprised that any reader would mess up the margin style simply because of the presence of padding.

(You can generate some random paragraph text from http://www.lipsum.com/)

Last edited by Agama; 04-25-2013 at 07:55 AM.
Agama is offline   Reply With Quote
Advert
Old 04-25-2013, 07:58 AM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A

Strange behaviour
The box model (section 8 of CSS2) layers:

Margin
border
padding
content

are you sure that you are not introducing a CSS error. Adobe (MRSDK) is famous for tossing the whole CSS if it runs into many errors.
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A New Epub Creator: txt to epub, word to epub oxen ePub 120 07-22-2019 02:28 PM
Weird Table-padding after ePub conversion using Calibre kris33 Kindle Formats 2 01-13-2012 10:00 PM
epub "padding left" to mobi "block quote" conversion issue 1611mac Conversion 3 01-11-2012 02:10 PM
epub to mobi - padding right not working 1611mac Conversion 3 11-12-2011 04:10 PM
epub, ePub, EPUB, warum blos ePub? flowoeB Lounge 5 11-27-2009 09:37 AM


All times are GMT -4. The time now is 11:55 PM.


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