Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-25-2007, 12:29 AM   #526
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: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You don't actually need --ignore-tables, since it automatically ignores table markup when cells are alrge. --ignore-tables causes it to ignore *all* table markup.
kovidgoyal is offline   Reply With Quote
Old 10-27-2007, 03:41 PM   #527
moneytoo
Enthusiast
moneytoo began at the beginning.
 
Posts: 39
Karma: 20
Join Date: Oct 2007
Location: Czech Republic
Device: Sony PRS-505
Hi kovidgoyal,
thanks for all the useful tools. Im just trying to convert some web pages to see how it can handle the charset I use.

I used this command
Code:
html2lrf -o "c:\Program Files\libprs500\test\test.lrf" --link-levels=0 --serif-family="C:\Windows\Fonts, Times New Roman" "c:\Program Files\libprs500\test\default8391.html"
But all I get is a LRF file which cant be read neither the Sony eBook Library or the LRF viewer.

The LRF viewer prints this:
Code:
LRFParseError: Bad tag ID 00 at 1701355
Failed to render document
Detailed traceback:
Traceback (most recent call last):
  File "main.py", line 47, in run
  File "libprs500\ebooks\lrf\parser.pyo", line 38, in parse
  File "libprs500\ebooks\lrf\parser.pyo", line 62, in _parse_objects
  File "libprs500\ebooks\lrf\parser.pyo", line 70, in _parse_object
  File "libprs500\ebooks\lrf\objects.pyo", line 1102, in get_object
  File "libprs500\ebooks\lrf\objects.pyo", line 79, in __init__
  File "libprs500\ebooks\lrf\tags.pyo", line 202, in __init__
LRFParseError: Bad tag ID 00 at 1701355
If I delete all the CSS files, html2lrf creates right file. But I think it shouldnt create LRF which cant be read. Havent tried put it on the Reader because I dont have any warranty outside the US (I know it has reset button but Im too scared :-) ).

EDIT: I have just tryid downloading the site using web2disk and then converting but I got same results. (The site is http://www.mobilmania.cz/default.aspx?textver=1)
Attached Files
File Type: zip website.zip (8.6 KB, 242 views)

Last edited by moneytoo; 10-27-2007 at 03:50 PM.
moneytoo is offline   Reply With Quote
Old 10-27-2007, 04:19 PM   #528
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: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Fixed in svn. Will be in next release.
kovidgoyal is offline   Reply With Quote
Old 10-27-2007, 05:19 PM   #529
balok
Ugly alien
balok doesn't litterbalok doesn't litterbalok doesn't litter
 
balok's Avatar
 
Posts: 144
Karma: 225
Join Date: Sep 2007
Location: Québec, QC
Device: tricorder
line spacing

Hi kovidgoyal,

The --font-delta option seems to affect both line spacing and font size. Is there a way to change only the line spacing, without affecting font size? If not, could you incorporate this ability into a future version?

Thanks!
balok is offline   Reply With Quote
Old 10-27-2007, 05:43 PM   #530
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: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The next version will have support for the CSS property line-height. Use

Code:
html2lrf --override-css "body {line-height: 200%}" myfile.html
kovidgoyal is offline   Reply With Quote
Old 10-27-2007, 07:23 PM   #531
balok
Ugly alien
balok doesn't litterbalok doesn't litterbalok doesn't litter
 
balok's Avatar
 
Posts: 144
Karma: 225
Join Date: Sep 2007
Location: Québec, QC
Device: tricorder
Quote:
Originally Posted by kovidgoyal View Post
The next version will have support for the CSS property line-height. Use

Code:
html2lrf --override-css "body {line-height: 200%}" myfile.html
Will this also work for decreasing the line spacing, by using negative values?
balok is offline   Reply With Quote
Old 10-27-2007, 07:26 PM   #532
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: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use percentages smaller than 100%
kovidgoyal is offline   Reply With Quote
Old 10-27-2007, 07:28 PM   #533
balok
Ugly alien
balok doesn't litterbalok doesn't litterbalok doesn't litter
 
balok's Avatar
 
Posts: 144
Karma: 225
Join Date: Sep 2007
Location: Québec, QC
Device: tricorder
Quote:
Originally Posted by kovidgoyal View Post
Use percentages smaller than 100%
Of course, thanks.
balok is offline   Reply With Quote
Old 10-29-2007, 12:58 AM   #534
aapezzuto
Zealot
aapezzuto will become famous soon enoughaapezzuto will become famous soon enoughaapezzuto will become famous soon enoughaapezzuto will become famous soon enoughaapezzuto will become famous soon enoughaapezzuto will become famous soon enough
 
aapezzuto's Avatar
 
Posts: 116
Karma: 693
Join Date: Sep 2007
Device: none
Is there any way to get a multipage demo of this, with 3-4 html files in a zip, and that spine elements file? maybe even an image or two so I can see how all that is suppose to work?
aapezzuto is offline   Reply With Quote
Old 10-29-2007, 02:12 AM   #535
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: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You dont need to do anything special for images. As for the spine, just get any lit file and unpack it using clit, look at the .opf file for an example of the spine in action.
kovidgoyal is offline   Reply With Quote
Old 11-01-2007, 07:09 AM   #536
beartard
Minister of Linux
beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40
 
beartard's Avatar
 
Posts: 196
Karma: 73235
Join Date: Jul 2007
Location: Winter Haven, Florida, USA
Device: nook, T-Mobile MyTouch 3G Slide
I've got a new question (I think) about html2lrf's capabilities.

I've been trying to convert a book with a great deal of endnotes. In the text where the endnote number is superscripted, I'm making the following tag:
Code:
<a name="g1"></a><a href="#f1">[1]</a>
Theoretically this should define the current spot as "g1" (for "go-back" when I want to return from the endnote page) and take me to the spot I've named as "f1" (footnote number one). On the endnote page, I reverse the process, giving myself a link back to the spot I came from when following the endnote link.

When I run the html through html2lrf, it doesn't seem to be able to pick up on an empty "name" anchor. My browser seems to handle it just fine. Am I doing something wrong or is this just an example where I should wrap the "name" anchor around some text?
beartard is offline   Reply With Quote
Old 11-01-2007, 12:24 PM   #537
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: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm that shouldn't happen. Can you attach a test case that demonstrates this behavior.
kovidgoyal is offline   Reply With Quote
Old 11-02-2007, 06:50 AM   #538
beartard
Minister of Linux
beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40beartard is slicker than a case of WD-40
 
beartard's Avatar
 
Posts: 196
Karma: 73235
Join Date: Jul 2007
Location: Winter Haven, Florida, USA
Device: nook, T-Mobile MyTouch 3G Slide
I'll send you one of the books I"m working on via e-mail if you like. It's still under copyright, so I won't post it here.

Last edited by beartard; 11-02-2007 at 06:53 AM.
beartard is offline   Reply With Quote
Old 11-02-2007, 11:52 AM   #539
Icarusbop
Groupie
Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.Icarusbop knows what's going on.
 
Posts: 156
Karma: 25846
Join Date: Apr 2007
Location: UK
Device: PRS505
Thumbs up using ZIP files

This is great work - thanks for all your effort, this program may well convert me from buying a Gen3 to getting the new 505...

Can I have some clarification on zip files please.

I assume I use zip files for sending more than 1 file to the converter (multiple html's for example), I can also add an opf file that then tells your software in which order to add the multiple files.
I read earlier that the 'Spine' area of the opf in used for the file order - are the rest of the areas in the opf file ignored? (the 'manifest' area for example)

Can I use this sytem to insert a cover image? I presume I can create an html file containing a link to the cover image I want, add both the file and my image to the zip, then add the name of the html file to the beginning of the 'spine' area of the opf file. I have tried this but it does not work: is there a maximum size (in dimensions or Kb) that the cover image I am using can be?

Thanks for all your great work!!
Icarusbop is offline   Reply With Quote
Old 11-02-2007, 12:32 PM   #540
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: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
To have the cover detected from the zip file you can do the following:

In the <guide> element have a <reference> element lije that shown below

Code:
<reference type="cover" href="relative path to cover file" />
Also note that the converter is recursive, if you give it a single HTML file, it will follow all links in that file to other files on your hard disk.
kovidgoyal is offline   Reply With Quote
Reply

Tags
html2lrf, libprs500


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change font of header for LRF Output on PRS 505 duckbill Calibre 3 05-15-2010 11:07 AM
Pissed off with LRF formatting: LRF/LRS clean tool? grimborg LRF 8 02-15-2010 01:14 PM
Fonts for LRF output krischik Calibre 1 10-03-2009 05:01 AM
CBZ > LRF (LRF>HTML/MOBI????) sideburnt Calibre 4 09-15-2009 06:44 AM
libprs500 Issues Converting .LIT to .LRF - .LRF crashes everything vasbinde Calibre 6 02-14-2008 12:16 PM


All times are GMT -4. The time now is 02:06 AM.


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