|  05-12-2012, 02:09 PM | #1 | 
| Groupie            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: 
 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! | 
|   |   | 
|  05-12-2012, 02:20 PM | #2 | |
| Well trained by Cats            Posts: 31,249 Karma: 61360164 Join Date: Aug 2009 Location: The Central Coast of California Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A | Quote: 
  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. | |
|   |   | 
| Advert | |
|  | 
|  05-12-2012, 04:15 PM | #3 | 
| Groupie            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. | 
|   |   | 
|  05-12-2012, 11:12 PM | #4 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | |
|   |   | 
|  05-12-2012, 11:38 PM | #5 | |
| Groupie            Posts: 171 Karma: 1706300 Join Date: Oct 2010 Device: iDevices | Quote:  Kovid! | |
|   |   | 
| Advert | |
|  | 
|  05-12-2012, 11:51 PM | #6 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | |
|   |   | 
|  05-12-2012, 11:57 PM | #7 | 
| Groupie            Posts: 171 Karma: 1706300 Join Date: Oct 2010 Device: iDevices | 
			
			Excellent! Thanks so much!!!
		 | 
|   |   | 
|  05-13-2012, 10:18 AM | #8 | 
| Groupie            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!) | 
|   |   | 
|  05-15-2012, 02:25 PM | #9 | 
| Jr. - Junior Member            Posts: 586 Karma: 2000358 Join Date: Aug 2010 Location: Alabama Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10" | |
|   |   | 
|  05-15-2012, 02:31 PM | #10 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 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.
		 | 
|   |   | 
|  05-18-2012, 01:45 PM | #11 | 
| Groupie            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. | 
|   |   | 
|  | 
| 
 | 
|  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 |