View Single Post
Old 10-16-2008, 07:55 AM   #139
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by =X= View Post
The margins are still off on all of them. Can you post the html and the command line you are using to create the ePUB?
Unzip the bierig-src.zip attached and use the following command html2epub command. BTW, I had to do all of this in the calibre install directory for it to work properly with path's and such. You may have a different (better) way to do this.

Code:
HTML2EPUB COMMAND
=================
html2epub -o BEST-calibre-bierig-MinFilter5-500-1-5.epub -t "bierig-MinFilter5-500-1-5" -a "bierig.pdf"  --publisher="NR" --verbose bierig.html

HTML2EPUB OUTPUT
================
Building file list...
        Found files...
                HTMLFile:0:a:C:\Program Files\calibre\bierig.html
INFO:   Parsing Program Files\calibre\bierig.html
INFO:           Rationalizing fonts...
DEBUG:          Done rationalizing
DEBUG: Saving stylesheets...
INFO: Output written to C:\Program Files\calibre\BEST-calibre-bierig-MinFilter5-500-1-5.epub
This produces the BEST-calibre-bierig-MinFilter5-500-1-5.epub file.

Inside the .epub calibre places bierig_0.css, bierig_1.css and bierig_2.css files, with bierig_0.css derived from my .html, but bierig_2.css (created by calibre) has some standard margins that may effect what you see. I don't know of any way to turn them off, if they are the cause of that offset you see.
Code:
bierig_0.css
========
p {
    text-indent: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 0;
    text-align: none
    }
.calibre_class_0 {
    page-break-before: always
    }

bierig_1.css
========
empty

bierig_2.css
========
body {
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0
    }
@page {
    margin-top: 5.000000pt;
    margin-bottom: 5.000000pt;
    margin-left: 5.000000pt;
    margin-right: 5.000000pt
    }
a {
    color: inherit;
    text-decoration: inherit;
    cursor: default
    }
a[href] {
    color: blue;
    text-decoration: underline;
    cursor: pointer
    }
p {
    text-indent: 2.1em;
    margin-top: 1pt;
    margin-bottom: 1pt;
    padding: 0;
    border: 0
    }
I hand edited the bierig_2.css file to remove any margins and re-zipped it all as a .epub. I attach that 'nomargins' .epub below to see if this helps!
Attached Files
File Type: zip bierig-src.zip (180.0 KB, 584 views)
File Type: epub BEST-calibre-bierig-MinFilter5-500-1-5-nomargins.epub (182.7 KB, 758 views)

Last edited by nrapallo; 10-16-2008 at 05:02 PM. Reason: typo
nrapallo is offline   Reply With Quote