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 05-12-2012, 02:09 PM   #1
Jane12
Groupie
Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.
 
Posts: 171
Karma: 1706300
Join Date: Oct 2010
Device: iDevices
Stop Calibre from adding page margins?

Hi! Calibre is great! Many thanks to the developers!

I was wondering, is there a way to prevent Calibre from generating and adding page margins to epubs?

From what I can tell, Calibre automatically takes settings from Prefs > Page Setup > Margins and adds them to each epub thus:
  • margin-left/right get added to .calibre in stylesheet.css
  • margin-top/bottom get added with an @page command either at the top of each html file or in the new page_styles.css generated in v0.8.51 (thanks for moving this to an external stylesheet!)

What I would like is for these margin commands not to be added at all.

I've tried deleting the entries in Prefs > Page Setup > Margins, but that doesn't work, the settings can't be empty/blank. Entering zero doesn't help, as that just sets the margins to zero.

If it matters, I'm using "Default Output Profile."

Any suggestions? Thx!
Jane12 is offline   Reply With Quote
Old 05-12-2012, 02:20 PM   #2
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,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Jane12 View Post
Hi! Calibre is great! Many thanks to the developers!

I was wondering, is there a way to prevent Calibre from generating and adding page margins to epubs?

From what I can tell, Calibre automatically takes settings from Prefs > Page Setup > Margins and adds them to each epub thus:
  • margin-left/right get added to .calibre in stylesheet.css
  • margin-top/bottom get added with an @page command either at the top of each html file or in the new page_styles.css generated in v0.8.51 (thanks for moving this to an external stylesheet!)

What I would like is for these margin commands not to be added at all.

I've tried deleting the entries in Prefs > Page Setup > Margins, but that doesn't work, the settings can't be empty/blank. Entering zero doesn't help, as that just sets the margins to zero.

If it matters, I'm using "Default Output Profile."

Any suggestions? Thx!
Set them to a very small number: 1px
Not all devices show the edge of the screen (the bezel overlaps) . A couple of pts gives most device users a chance
BTW once any profile has been used on a title, those settings will be stored unless you use the button (tick box in bulk mode) to release prior settings.
theducks is offline   Reply With Quote
Advert
Old 05-12-2012, 04:15 PM   #3
Jane12
Groupie
Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.
 
Posts: 171
Karma: 1706300
Join Date: Oct 2010
Device: iDevices
Thanks for the suggestion, but setting the margins to 1px (or 1pt or 0) doesn't stop the margin commands from being added. It simply makes the margins very small. But the css is still added.

The only way I've figured out how to get what I want is to unzip the epub file, open the css stylesheet and manually delete the margin commands that Calibre has added, then re-zipping it.

I'm just wondering if there's a way to stop the margin commands from being added in the first place.
Jane12 is offline   Reply With Quote
Old 05-12-2012, 11:12 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
http://bazaar.launchpad.net/~kovid/c...revision/12167
kovidgoyal is online now   Reply With Quote
Old 05-12-2012, 11:38 PM   #5
Jane12
Groupie
Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.
 
Posts: 171
Karma: 1706300
Join Date: Oct 2010
Device: iDevices
Quote:
Originally Posted by kovidgoyal View Post
Whoah! Most of that page went over my head, but if I'm understanding it correctly, I'll find the option I'm looking for in the next Calibre release? If so, Kovid!
Jane12 is offline   Reply With Quote
Advert
Old 05-12-2012, 11:51 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Jane12 View Post
Whoah! Most of that page went over my head, but if I'm understanding it correctly, I'll find the option I'm looking for in the next Calibre release? If so, Kovid!
Yes, you will, simply set the margin you dont want to a negative value.
kovidgoyal is online now   Reply With Quote
Old 05-12-2012, 11:57 PM   #7
Jane12
Groupie
Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.
 
Posts: 171
Karma: 1706300
Join Date: Oct 2010
Device: iDevices
Excellent! Thanks so much!!!
Jane12 is offline   Reply With Quote
Old 05-13-2012, 10:18 AM   #8
Jane12
Groupie
Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.
 
Posts: 171
Karma: 1706300
Join Date: Oct 2010
Device: iDevices
P.S. I'm curious as to why the @page margin-top/bottom commands were moved to a separate page_styles.css stylesheet instead of being added to the regular stylesheet.css. Is there an advantage to separating the commands and having two separate stylesheets instead of putting all the css in one sheet?

(Either way, I'm happy that the @page margin-top/bottom commands have been removed from the individual html files. Much easier to edit now! Thx!)
Jane12 is offline   Reply With Quote
Old 05-15-2012, 02:25 PM   #9
Jabby
Jr. - Junior Member
Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.
 
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
Quote:
Originally Posted by kovidgoyal View Post
Yes, you will, simply set the margin you dont want to a negative value.
It would be nice if it could be done away with entirely. This really screws up Cool Reader and I have no idea if @buggins will fix it or when.

Regards - John
Jabby is offline   Reply With Quote
Old 05-15-2012, 02:31 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Setting them to negative means there will be no margin declarations for @page and body in the epub produced by calibre.
kovidgoyal is online now   Reply With Quote
Old 05-18-2012, 01:45 PM   #11
Jane12
Groupie
Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.Jane12 ought to be getting tired of karma fortunes by now.
 
Posts: 171
Karma: 1706300
Join Date: Oct 2010
Device: iDevices
Just tried the latest update 0.8.52 and it's perfect -- does exactly what I wanted. Thank you so much, Kovid!!!

----------------------------------------------------------------

P.S. If anyone's wondering about "negative margins" -- what happens is you go to Prefs > Page Setup > margins. The default is 5.0. As you tick the little arrow down, it will say: 5.0 > 4.0 > 3.0 > 2.0 > 0.0 > "no margin".

So the numbers don't actually become negative. Once you go below 0.0, it just says "no margin" -- and then, as Kovid says and Jabby requests, no margin declarations are added to the epub.

Last edited by Jane12; 05-20-2012 at 11:27 AM.
Jane12 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I stop Calibre from rasterizing the first page angharad09 Conversion 2 03-01-2012 12:37 AM
ePub page number and margins Julien Pham ePub 23 12-26-2011 10:13 PM
Adding page breaks in Calibre breaks ePubcheck validation bookraft Conversion 16 03-01-2011 01:23 PM
Crop PDF page margins with Skim Juggle4Evr Sony Reader 8 03-30-2009 02:12 PM
Yet Another Thread on Page Numbers (when will it stop?) JSWolf Workshop 19 04-11-2008 06:31 AM


All times are GMT -4. The time now is 04:15 AM.


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