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

Go Back   MobileRead Forums > E-Book Formats > Other formats > LRF

Notices

Reply
 
Thread Tools Search this Thread
Old 09-04-2008, 07:48 AM   #1
elinares
Xtreme Quijote
elinares doesn't litterelinares doesn't litterelinares doesn't litter
 
elinares's Avatar
 
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
LRFTools. Convert LRF to EPUB, HTML, PDF and RTF

Another tool, credits to scotty1024 (LRFParse.java), Bruno Lowagie (iText) and people at apache jakarta project, xHTMLRenderer project and others right now I cannot remember.

It can convert LRF files to RTF, PDF, HTML and EPUB. Also can merge LRF and PDF books in one big PDF with TOC, and merge EPUB files into one. And now you can view epub files (use page and key down/up).

You can convert PDFs to EPUB using this tool.
And starting at version 0.9.193, you can conver MS Word 2007 (docx) files to EPUB
v0.9.204 can deal with all scrambled and/or compressed streams

New version 0.9.236 use latest versions of pdfbox, iText and some other libs. For devs: LRFTools is now a Maven project.

Usage:
http://code.google.com/p/lrf-epub-tools/

Download:
http://code.google.com/p/lrf-epub-tools/downloads/list

ChangeLog:
http://code.google.com/p/lrf-epub-tools/updates/list
Attached Thumbnails
Click image for larger version

Name:	Dibujo-alicia.jpg
Views:	7097
Size:	248.6 KB
ID:	17385  

Last edited by elinares; 11-24-2009 at 07:22 AM. Reason: New Version 0.9.236
elinares is offline   Reply With Quote
Old 09-04-2008, 09:23 AM   #2
Format C:
Guru
Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.
 
Posts: 753
Karma: 1496807
Join Date: Jul 2008
Location: The Third World
Device: iLiad + PRS-505 + Kindle 3
Genial!
I download a LRF from here, and I'll try it immediatly!
Format C: is offline   Reply With Quote
Advert
Old 09-04-2008, 09:30 AM   #3
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
Quote:
Originally Posted by elinares View Post
Another tool, credits to scotty1024 (LRFParse.java) and Bruno (iText). It can convert LRF files to RTF, PDF or XML (my own xml format).
Sounds great - does it preserve formatting and images and all?
acidzebra is offline   Reply With Quote
Old 09-04-2008, 09:36 AM   #4
Format C:
Guru
Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.
 
Posts: 753
Karma: 1496807
Join Date: Jul 2008
Location: The Third World
Device: iLiad + PRS-505 + Kindle 3
I'm unlucky...

Put the book in a dir called "a". Here's the output:

Code:
Error occurred during initialization of VM
Incompatible minimum and maximum heap sizes specified
Any suggestion?
Format C: is offline   Reply With Quote
Old 09-04-2008, 09:39 AM   #5
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
Quote:
Originally Posted by Format C: View Post
Code:
Error occurred during initialization of VM
Incompatible minimum and maximum heap sizes specified
I had the same, but removing the "-Xms100M" part solved that - I don't know what it is for? Something for allocating heap size?

As for images, it looks like they are preserved! Yay!

Some of the formatting looked a bit weird in PDF but links work, the formatting looks better in RTF but I lost the links.

Great effort! This totally should be a sticky post.

Last edited by acidzebra; 09-04-2008 at 09:46 AM.
acidzebra is offline   Reply With Quote
Advert
Old 09-04-2008, 09:46 AM   #6
Format C:
Guru
Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.
 
Posts: 753
Karma: 1496807
Join Date: Jul 2008
Location: The Third World
Device: iLiad + PRS-505 + Kindle 3
Removed the option, here's the output:

Code:
Creando 2003.rtf...java.lang.NullPointerException
        at java.lang.StringBuffer.<init>(Unknown Source)
        at com.lowagie.text.Meta.<init>(Unknown Source)
        at com.lowagie.text.Header.<init>(Unknown Source)
        at com.lowagie.text.Document.addHeader(Unknown Source)
        at lrf.objects.Book.getRTF(Book.java:245)
        at lrf.parse.RecurseDirs.dumpToRTF(RecurseDirs.java:156)
        at lrf.parse.RecurseDirs.convertAction(RecurseDirs.java:204)
        at lrf.parse.RecurseDirs.<init>(RecurseDirs.java:108)
        at lrf.parse.RecurseDirs.main(RecurseDirs.java:33)
RTF Error
Same with pdf.
Format C: is offline   Reply With Quote
Old 09-04-2008, 10:28 AM   #7
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
Quote:
Originally Posted by Format C: View Post
Removed the option, here's the output:

Code:
Creando 2003.rtf...java.lang.NullPointerException
        at java.lang.StringBuffer.<init>(Unknown Source)
        at com.lowagie.text.Meta.<init>(Unknown Source)
        at com.lowagie.text.Header.<init>(Unknown Source)
        at com.lowagie.text.Document.addHeader(Unknown Source)
        at lrf.objects.Book.getRTF(Book.java:245)
        at lrf.parse.RecurseDirs.dumpToRTF(RecurseDirs.java:156)
        at lrf.parse.RecurseDirs.convertAction(RecurseDirs.java:204)
        at lrf.parse.RecurseDirs.<init>(RecurseDirs.java:108)
        at lrf.parse.RecurseDirs.main(RecurseDirs.java:33)
RTF Error
Same with pdf.
Wow, you ARE unlucky. I tried this on my corporate XP box.

Commandline: java -jar LRFTools.jar convert d:\export -RTF
Where D:\export contained the lrfs (a single one to test, actually)

java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

So what command line and java version for you?
acidzebra is offline   Reply With Quote
Old 09-04-2008, 10:33 AM   #8
elinares
Xtreme Quijote
elinares doesn't litterelinares doesn't litterelinares doesn't litter
 
elinares's Avatar
 
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
Quote:
Originally Posted by Format C: View Post
I'm unlucky...

Put the book in a dir called "a". Here's the output:

Code:
Error occurred during initialization of VM
Incompatible minimum and maximum heap sizes specified
Any suggestion?
Yes, I must say you need a java VM version 1.6, and append also -Xmx100M. I'm going to edit initial post to reflect this.
elinares is offline   Reply With Quote
Old 09-04-2008, 10:35 AM   #9
elinares
Xtreme Quijote
elinares doesn't litterelinares doesn't litterelinares doesn't litter
 
elinares's Avatar
 
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
Quote:
Originally Posted by Format C: View Post
Removed the option, here's the output:

Code:
Creando 2003.rtf...java.lang.NullPointerException
        at java.lang.StringBuffer.<init>(Unknown Source)
        at com.lowagie.text.Meta.<init>(Unknown Source)
        at com.lowagie.text.Header.<init>(Unknown Source)
        at com.lowagie.text.Document.addHeader(Unknown Source)
        at lrf.objects.Book.getRTF(Book.java:245)
        at lrf.parse.RecurseDirs.dumpToRTF(RecurseDirs.java:156)
        at lrf.parse.RecurseDirs.convertAction(RecurseDirs.java:204)
        at lrf.parse.RecurseDirs.<init>(RecurseDirs.java:108)
        at lrf.parse.RecurseDirs.main(RecurseDirs.java:33)
RTF Error
Same with pdf.
Hmm, Could you send/post me the book? I'll try...
elinares is offline   Reply With Quote
Old 09-04-2008, 10:44 AM   #10
Format C:
Guru
Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.
 
Posts: 753
Karma: 1496807
Join Date: Jul 2008
Location: The Third World
Device: iLiad + PRS-505 + Kindle 3
OK tried java -version:

Code:
java version "1.6.0_04"
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
Format C: is offline   Reply With Quote
Old 09-04-2008, 10:44 AM   #11
elinares
Xtreme Quijote
elinares doesn't litterelinares doesn't litterelinares doesn't litter
 
elinares's Avatar
 
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
Quote:
Originally Posted by acidzebra View Post
Sounds great - does it preserve formatting and images and all?
Yes, it supports PNG, GIF, BMP and JPG both to PDF and RTF. I have try to conserve formatting, but sometimes with books created with some tools tends to create one paragrap per line, and then the conversions try to emit a new Paragraph for each line. I've try to 'concatenate' these, there is a program parameter to do this (Beta) : -catpar. So if you try:

java -jar LRFTools.jar convert dir -PDF -RTF -catpar

LRFTools try to concatenate these lines, but this is not always the best formatting...

Last edited by elinares; 09-04-2008 at 10:46 AM.
elinares is offline   Reply With Quote
Old 09-04-2008, 10:50 AM   #12
Format C:
Guru
Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.Format C: ought to be getting tired of karma fortunes by now.
 
Posts: 753
Karma: 1496807
Join Date: Jul 2008
Location: The Third World
Device: iLiad + PRS-505 + Kindle 3
No luck with < java -Xms100M -Xmx100M -jar LRFTools.jar convert a -RTF > neither.

I'm trying this book here:

https://www.mobileread.com/forums/sho...429#post246429
Format C: is offline   Reply With Quote
Old 09-04-2008, 10:55 AM   #13
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
Quote:
Originally Posted by elinares View Post
I have try to conserve formatting, but sometimes with books created with some tools tends to create one paragrap per line, and then the conversions try to emit a new Paragraph for each line
Hmmm, I attached two examples. The source file for conversion to lrf was plain HTML, no special formatting. The de-converted rtf file looks great, but the line spacing on the PDF goes wonky in places. See the attached examples.

I will reiterate, great tool - many many thanks.
Attached Thumbnails
Click image for larger version

Name:	rtfexample.jpg
Views:	2155
Size:	63.2 KB
ID:	16000   Click image for larger version

Name:	pdfexample.jpg
Views:	2252
Size:	93.6 KB
ID:	16001  
acidzebra is offline   Reply With Quote
Old 09-04-2008, 01:48 PM   #14
GeneS
eBook Enthusiast
GeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enough
 
GeneS's Avatar
 
Posts: 120
Karma: 726
Join Date: Dec 2007
Location: US
Device: Sony PRS-350, Astak PocketPro, iPhone, Asus eee Pad Transformer
I'm trying it with no luck so far.
Running java -version, results in:
Java(TM) SE Runtime Environment (build 1.6.0_07_b06)
Java HotSpot(TM) Client VM (Build 10.0-b23, mixed mode, sharing)

Trying to run the command:
java -Xms100M -Xmx100M -jar LRFTools.jar convert h:\ebook Conversion\lrftools -RTF

trying to get just an rtf output for a single lrf (Trumpet-Major.lrf) in the directory results in:

java.lang.NullPointerException
at lrf.parse.ResurseDirs.convertAction(RecurseDirs.ja va:186)
at lrf.parse.ResurseDirs.(init)(RecurseDirs.java:108)
at lrf.parse.ResurseDirs.main(RecurseDirs.java:33)

Since I'm not a java-phile, I have no idea where to go from here. Any help out there?

Thanks,
Gene
GeneS is offline   Reply With Quote
Old 09-04-2008, 03:32 PM   #15
elinares
Xtreme Quijote
elinares doesn't litterelinares doesn't litterelinares doesn't litter
 
elinares's Avatar
 
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
Quote:
Originally Posted by Format C: View Post
No luck with < java -Xms100M -Xmx100M -jar LRFTools.jar convert a -RTF > neither.

I'm trying this book here:

https://www.mobileread.com/forums/sho...429#post246429
OK, this night I will take a look...
elinares 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
A real PDF to epub/djvu/rtf/html software?. DsOft ePub 35 01-02-2011 03:57 PM
PRS-700 Unable to convert pdf to other formats (epub/rtf/doc) testndtv Sony Reader 1 09-24-2010 01:45 PM
How to create non-embedded Unicode EPUB,LRF,TXT,RTF,PDF alexmobile Sony Reader 1 09-23-2009 10:04 PM
Calibre PDF conversions - LRF/EPUB vs RTF jackie_w Calibre 14 09-22-2009 03:06 PM
[Old Thread] unable to convert ebooks(rtf, txt,lit,html,pdf) to lrf in calibre .4.131 jackdeth191 Calibre 9 05-02-2009 02:55 AM


All times are GMT -4. The time now is 12:01 AM.


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