Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-25-2013, 05:10 PM   #1
andin1
Junior Member
andin1 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Mar 2013
Device: SPCInternet 5602F
epub shows truncated on my reader

Hello.

I use Calibre to convert saved web pages ( that i have cleaned before with Open Office Writer ) .

The output as epub shows well in the viewer. But when I load the file on my ereader ( sold in Spain as SPCInternet ) the result is truncated to the end. If I converte to fb2. It shows weel.

Any idea to correct the problem ?
andin1 is offline   Reply With Quote
Old 03-25-2013, 07:00 PM   #2
theducks
Grand Sorcerer
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: 15,222
Karma: 5940081
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by andin1 View Post
Hello.

I use Calibre to convert saved web pages ( that i have cleaned before with Open Office Writer ) .

The output as epub shows well in the viewer. But when I load the file on my ereader ( sold in Spain as SPCInternet ) the result is truncated to the end. If I converte to fb2. It shows weel.

Any idea to correct the problem ?
what is your EPUB: Split files bigger than value?
theducks is offline   Reply With Quote
Old 03-26-2013, 02:59 PM   #3
andin1
Junior Member
andin1 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Mar 2013
Device: SPCInternet 5602F
Quote:
Originally Posted by theducks View Post
what is your EPUB: Split files bigger than value?
My files are very small. Less than 100 kb.

Note that most webpages have very few text. Most content are images.
andin1 is offline   Reply With Quote
Old 03-26-2013, 05:29 PM   #4
theducks
Grand Sorcerer
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: 15,222
Karma: 5940081
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by andin1 View Post
My files are very small. Less than 100 kb.

Note that most webpages have very few text. Most content are images.

The only other thing I can think of is invalid code. Not all devices are tolerant.
theducks is offline   Reply With Quote
Old 03-29-2013, 04:40 PM   #5
andin1
Junior Member
andin1 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Mar 2013
Device: SPCInternet 5602F
Quote:
Originally Posted by theducks View Post

The only other thing I can think of is invalid code. Not all devices are tolerant.
Any idea of what kind of html code usually used in webpages doesn't translated well by calibre ?
andin1 is offline   Reply With Quote
Old 03-29-2013, 04:58 PM   #6
theducks
Grand Sorcerer
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: 15,222
Karma: 5940081
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Nope!

The first thing to do id Validate (W3c validate) the starting code

Bad code = bad conversion

Then consider that everything (valid) you can do in HTML does not have a translation to EPUB
Then consider that not all devices accept every Valid (in EPUB) command

Makes it fun
theducks is offline   Reply With Quote
Old 04-01-2013, 03:58 PM   #7
andin1
Junior Member
andin1 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Mar 2013
Device: SPCInternet 5602F
Quote:
Originally Posted by theducks View Post
Nope!

The first thing to do id Validate (W3c validate) the starting code

Bad code = bad conversion

Then consider that everything (valid) you can do in HTML does not have a translation to EPUB
Then consider that not all devices accept every Valid (in EPUB) command

Makes it fun
I try to convert pages of eldiario.es

I have used the rss conversion of calibre and it performs quite well.

But I want to convert any page, once I have removed some comments from the readers that I don't find interesting.

I use Mozilla Seamonkey. Before I save a page in my computer I use DOM Inspector to remove any script, Form or Iframe. in the tree.

Then I use OpenOffice writer to format the text and to remove further fragments that I don't want.

Then I import In calibre.

I further try to clean some errors detected in Sigil ( most name and border attributes in <img> tags )

The result is that the last page is truncated. But it depends on the font-size that I select in the reader. The bigger fontsize, more is truncated.

Note that if I change the fontsize in the epub ( eg 0.85 em instead of 1em ) using Sigil, sometimes my reader performs better.

I include a sample of the css :

".calibre {
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
padding-left: 0;
padding-right: 0
}
.calibre1 {
background: transparent;
display: block
}
.calibre1-western {
font-size: 1.66667em;
font-weight: bold;
line-height: 1.2;
margin-bottom: 0.67em;
margin-left: 0.18cm;
margin-right: 0.18cm;
margin-top: 0.67em;
page-break-before: auto
}
.calibre10 {
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
margin-top: 1em
}
.calibre11 {
height: 199px;
width: 356px
}
.calibre12 {
height: 187px;
width: 333px
}
.calibre13 {
height: 237px;
width: 357px
}
.calibre14 {
height: 236px;
width: 357px
}
.calibre15 {
margin-left: 0.18cm;
margin-right: 0.18cm;
margin-top: 1em;
page-break-after: always;
page-break-before: auto;
page-break-inside: auto
}
.calibre2 {
color: #000080
}
.calibre3 {
height: 92px;
width: 369px
}
.calibre4 {
}
.calibre5 {
height: 54px;
width: 406px
}
.calibre6 {
margin-bottom: 1em;
margin-left: 0.18cm;
margin-right: 0.18cm;
margin-top: 1em;
page-break-before: auto;
page-break-inside: avoid
}
.calibre7 {
font-weight: bold
}
.calibre8 {
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
margin-top: 1em;
page-break-before: auto;
page-break-inside: avoid
}
.calibre9 {
height: 240px;
width: 362px
}
.cuerpo-de-texto-con-sangria {
margin-bottom: 1em;
margin-left: 0.5cm;
margin-right: 0;
margin-top: 1em
}
.western {
font-size: 1.66667em;
font-weight: bold;
line-height: 1.2;
margin-bottom: 0.83em;
margin-left: 0.18cm;
margin-right: 0.18cm;
margin-top: 0.83em
}
"

Any error in the file ?
andin1 is offline   Reply With Quote
Old 04-01-2013, 04:11 PM   #8
theducks
Grand Sorcerer
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: 15,222
Karma: 5940081
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
W3C says that is a valid CSS for level 3 (which is not saying that all is allowed in EPUB)
Nothing really jumps out at me.

I don't think I have ever seen 2-3 @ Page-break's (calibre15) together before.
theducks is offline   Reply With Quote
Old 04-04-2013, 04:03 PM   #9
andin1
Junior Member
andin1 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Mar 2013
Device: SPCInternet 5602F
Bad generated TOC

I think that I Have found a partial solution.

It seams that calibre don't generate a TOC.

If I force an empty <h1> at the end of the epub, using Sigil, and generate a new TOC, the problem is corrected.

What causes to me another quetsion. What is the standard to mark the end of a book? Besides inserting <h1> fragment. are there other tags that identify the end of a book?

Its seems that a web page doesn't follow the structure of a normalbook.

So I must find a way to mark the end of a webpage to mimic e book.
andin1 is offline   Reply With Quote
Old 04-04-2013, 05:03 PM   #10
theducks
Grand Sorcerer
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: 15,222
Karma: 5940081
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by andin1 View Post
I think that I Have found a partial solution.

It seams that calibre don't generate a TOC.

If I force an empty <h1> at the end of the epub, using Sigil, and generate a new TOC, the problem is corrected.

What causes to me another quetsion. What is the standard to mark the end of a book? Besides inserting <h1> fragment. are there other tags that identify the end of a book?

Its seems that a web page doesn't follow the structure of a normalbook.

So I must find a way to mark the end of a webpage to mimic e book.
Nothing (using a broken tag is 100% NOT the correct way )

A book just ends
theducks is offline   Reply With Quote
Old 04-08-2013, 04:00 PM   #11
andin1
Junior Member
andin1 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Mar 2013
Device: SPCInternet 5602F
Quote:
Nothing (using a broken tag is 100% NOT the correct way )

A book just ends
I refer to <h1> </h1> pair.

I think that a ordinary webpage doesn't end with the same conventions as a book. Formally perhaps both end with </body></html>.

But I think that the semantics are stricter in the case of a book.

Bye the way, Is <blockquote> a valid tag in epub. The webpages i download have plenty of it, and I would know if i have to remove them or substitute by <p>
andin1 is offline   Reply With Quote
Old 04-08-2013, 04:22 PM   #12
theducks
Grand Sorcerer
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: 15,222
Karma: 5940081
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Each file has the normal HTML ending like you show. (in fact, each file can stand alone (assume CSS is properly present if used).

The OPF file chains pages(files) together to form the book

Here is an 'almost empty Sigil EPUB': Pretty simple
Attached Files
File Type: epub blank.epub (1.7 KB, 18 views)
theducks is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ePub to Mobi: Kindle shows br> on top nisarce Calibre 6 12-23-2011 11:13 AM
bug ? calibre epub viewer shows old title cybmole Calibre 11 03-03-2011 11:26 AM
after converting to epub, it shows as strange characters? mhmohamadi Calibre 1 05-23-2010 04:03 PM
PRS700 just shows Titlepage in EPUB cremofix Calibre 4 10-30-2009 02:17 PM


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


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