Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-08-2009, 08:11 AM   #196
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 alxwang View Post
Nice.
One more question: Is that possible to re-layout the text based LRF to other size. LRF is for 6 inch screen. Can LRFtool generate 10 inches PDF ?
Thanks
I'll take a look this weekend.

Quote:
Originally Posted by patricks View Post
Hi, I'm having trouble using this program to convert from LRF to PDF
It works fine for EPUB with the following instructions:

java -Xms200M -Xmx300M -jar LRFTools-v0.9.209.jar convertLRF c:\eBooks -EPUB

But with PDF at the end it returns the error, "The name 'P103' has no local destination." And the pdf file it creates won't open in acrobat- "The file is damaged and could not be repaired." Other than replacing EPUB with PDF the lines are the same.
Can anyone point out what I'm doing wrong?
Well, this mean page 103 has no anchor destination. It's a bug. Could you pm a link for the lrf?

Quote:
Originally Posted by patricks View Post
Just tried it on the mac side,used "java -Xms200M -Xmx300M -jar LRFTools-v0-1.9.209.jar convertLRF cd /eBooks/ -EPUB"
and got the following error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :675)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader .java:260)
at java.net.URLClassLoader.access$100(URLClassLoader. java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 16)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:280)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:374)
You must use a JVM 1.6 on Mac.

Quote:
Originally Posted by ericshliao View Post
Hi,
I am using LRFTools 0.9.209 to convert some lrf files to html. I found one minor problem:
The generated html will break line automatically for italic font-style text.
You can see from my attached html file and screenshot.

I don't think it's the problem of LRFTools. It should be the problem of browser (I tried it with IE and Firefox).

I can fix this problem by manually removing:
Code:
		</div>
		<div align="Justify">
That's not an elegant way.

I am wondering if this problem might be fixed by LRFTools by properly detecting paragraph and insert <p> tag (or something else), so I raise this issue.
Due to copyright concern, I can't distribute this lrf file to public. If you do need one to analyze the problem, I will try to find a free lrf file with the same problem.

Added:
I roughly browsed several html files generated from lrf, there is a common problem: no paragraph tag. IMHO, adding paragraph tags will make a better conversion.
Fixed italic problem. I'm gong to publish new version tomorrow with this.
Why p tags? Actually DIV tag is used instead of P...
elinares is offline   Reply With Quote
Old 05-08-2009, 12:25 PM   #197
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
New Version 0.9.211

Uploaded new version 0.9.211. Check first post please.
BUGS:
Newline before italics and bolds.
Some improvements converting lrf to epub and html.
elinares is offline   Reply With Quote
Advert
Old 05-08-2009, 01:18 PM   #198
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 alxwang View Post
Nice.
One more question: Is that possible to re-layout the text based LRF to other size. LRF is for 6 inch screen. Can LRFtool generate 10 inches PDF ?
Thanks
There is a command line argument (-A4) that do this.
elinares is offline   Reply With Quote
Old 05-08-2009, 01:48 PM   #199
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
This is some error log. The same lrf file, ok for v0.9.209, error for v0.9.211.
v0.9.211 does fix the break line problem. Thanx.
Code:
C:\Downloads\lrf\test> java -Xms200M -Xmx300M -jar LRFTools-v0.9.209.jar convert
LRF . -HTML
Creating Pride and Prejudice.html...HTML Ok

C:\Downloads\lrf\test> java -Xms200M -Xmx300M -jar LRFTools-v0.9.211.jar convert
LRF . -HTML
Creating Pride and Prejudice.html...HTML Error:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
        at java.util.ArrayList.RangeCheck(Unknown Source)
        at java.util.ArrayList.get(Unknown Source)
        at com.lowagie.text.Paragraph.add(Unknown Source)
        at com.lowagie.text.HeaderFooter.paragraph(Unknown Source)
        at com.lowagie.text.html.HtmlWriter.initFooter(Unknown Source)
        at com.lowagie.text.html.HtmlWriter.close(Unknown Source)
        at com.lowagie.text.Document.close(Unknown Source)
        at lrf.objects.Book.getHTML(Book.java:203)
        at lrf.RecurseDirs.dumpToHTML(RecurseDirs.java:423)
        at lrf.RecurseDirs.convertAction(RecurseDirs.java:530)
        at lrf.RecurseDirs.convertActionParams(RecurseDirs.java:352)
        at lrf.RecurseDirs.<init>(RecurseDirs.java:89)
        at lrf.RecurseDirs.main(RecurseDirs.java:41)

Last edited by ericshliao; 05-08-2009 at 01:51 PM.
ericshliao is offline   Reply With Quote
Old 05-08-2009, 04:48 PM   #200
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by elinares View Post
Why p tags? Actually DIV tag is used instead of P...
It seems that web browser and mobipocket reader will give additional line space to tag <p>, so there will be additional space between two paragraphs. For tag <div>, the line space between two paragraphs is just the same as common lines. That's why I want tag <p>.
Maybe it can be done by inserting addition attribute in <div>, but I don't know how.
ericshliao is offline   Reply With Quote
Advert
Old 05-10-2009, 01:02 PM   #201
alxwang
Connoisseur
alxwang began at the beginning.
 
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
Quote:
Originally Posted by elinares View Post
There is a command line argument (-A4) that do this.
Sweet!
Will test it at Monday.
Thanks a lot
alxwang is offline   Reply With Quote
Old 05-10-2009, 03:30 PM   #202
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 ericshliao View Post
This is some error log. The same lrf file, ok for v0.9.209, error for v0.9.211.
v0.9.211 does fix the break line problem. Thanx.
Code:
C:\Downloads\lrf\test> java -Xms200M -Xmx300M -jar LRFTools-v0.9.209.jar convert
LRF . -HTML
Creating Pride and Prejudice.html...HTML Ok

C:\Downloads\lrf\test> java -Xms200M -Xmx300M -jar LRFTools-v0.9.211.jar convert
LRF . -HTML
Creating Pride and Prejudice.html...HTML Error:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
        at java.util.ArrayList.RangeCheck(Unknown Source)
        at java.util.ArrayList.get(Unknown Source)
        at com.lowagie.text.Paragraph.add(Unknown Source)
        at com.lowagie.text.HeaderFooter.paragraph(Unknown Source)
        at com.lowagie.text.html.HtmlWriter.initFooter(Unknown Source)
        at com.lowagie.text.html.HtmlWriter.close(Unknown Source)
        at com.lowagie.text.Document.close(Unknown Source)
        at lrf.objects.Book.getHTML(Book.java:203)
        at lrf.RecurseDirs.dumpToHTML(RecurseDirs.java:423)
        at lrf.RecurseDirs.convertAction(RecurseDirs.java:530)
        at lrf.RecurseDirs.convertActionParams(RecurseDirs.java:352)
        at lrf.RecurseDirs.<init>(RecurseDirs.java:89)
        at lrf.RecurseDirs.main(RecurseDirs.java:41)
Could you pm me a link for the book?
elinares is offline   Reply With Quote
Old 05-10-2009, 05:26 PM   #203
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by elinares View Post
Could you pm me a link for the book?
Here is the ebook.
Attached Files
File Type: zip Pride and Prejudice.zip (2.40 MB, 442 views)
ericshliao is offline   Reply With Quote
Old 05-11-2009, 07:55 AM   #204
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Just tried the newer LRFTools_gui on my linux box. Running Java 1.6.0_10.

Hangs, I'm afraid...

Quote:
rogue@monster:~/bin/eBooks/LRFTools$ java -jar LRFTools_gui.jar
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at UnicodeIniReader.parseLine(UnicodeIniReader.java:9 4)
at UnicodeIniReader.read(UnicodeIniReader.java:63)
at UnicodeIniReader.<init>(UnicodeIniReader.java:50)
at LRFTools_gui.const_init(LRFTools_gui.java:1642)
at LRFTools_gui.<init>(LRFTools_gui.java:37)
at LRFTools_gui$44.run(LRFTools_gui.java:1539)
at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 597)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122)
The old version still launches fine.

Any suggestions?

m a r

Last edited by rogue_ronin; 05-11-2009 at 07:59 AM.
rogue_ronin is offline   Reply With Quote
Old 05-11-2009, 10:17 PM   #205
alxwang
Connoisseur
alxwang began at the beginning.
 
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
Quote:
Originally Posted by alxwang View Post
Sweet!
Will test it at Monday.
Thanks a lot
A4 Parameter works really well.
Thanks again.
alxwang is offline   Reply With Quote
Old 05-12-2009, 03:56 PM   #206
alxwang
Connoisseur
alxwang began at the beginning.
 
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
-rf a percentage of resistance to change size of font .
What's that mean? Can I use this one to increase font size?
Thanks.
alxwang is offline   Reply With Quote
Old 05-13-2009, 12:56 PM   #207
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 alxwang View Post
-rf a percentage of resistance to change size of font .
What's that mean? Can I use this one to increase font size?
Thanks.
It's difficult for me to explain -rf. I've been collecting books taht seems to be 'scanned' and 'OCR-ed', resulting in a reasonable quality but with one problem: small and unnecessary changes of font sizes on the same paragraph.
This is odd. (-rf number) parameter works this way:

When on a paragraph the font size is changed from size 'a' to size 'b'; if this parameter is specified and 'b' is greather or lower than (1+number%)*a, then the size is changed; otherwise the size of the font is not changed.

So, no, you cannot use this param to change font size, but this would not be difficult...
elinares is offline   Reply With Quote
Old 05-13-2009, 03:12 PM   #208
alxwang
Connoisseur
alxwang began at the beginning.
 
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
Quote:
Originally Posted by elinares View Post
It's difficult for me to explain -rf. I've been collecting books taht seems to be 'scanned' and 'OCR-ed', resulting in a reasonable quality but with one problem: small and unnecessary changes of font sizes on the same paragraph.
This is odd. (-rf number) parameter works this way:

When on a paragraph the font size is changed from size 'a' to size 'b'; if this parameter is specified and 'b' is greather or lower than (1+number%)*a, then the size is changed; otherwise the size of the font is not changed.

So, no, you cannot use this param to change font size, but this would not be difficult...
Cool.
The A4 reflow works really well but if I can set a "% of font size increase" it will be even more useful. It tells how much I want the font come to bigger like 120%. It is not new font size.
Thanks.
alxwang is offline   Reply With Quote
Old 05-13-2009, 08:31 PM   #209
alxwang
Connoisseur
alxwang began at the beginning.
 
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
One more question:
I compare the png result and PDF result and I found out the picture quality decreased a lot in PDF compare to png. How can I prevent that happen?
Thanks.
alxwang is offline   Reply With Quote
Old 05-17-2009, 08:46 PM   #210
adinb
RSS &amp;amp; Gadget Addict!
adinb is on a distinguished road
 
adinb's Avatar
 
Posts: 82
Karma: 67
Join Date: May 2005
Location: Albuquerque, NM
Device: Sony PRS-500, iPod Touch, iPhone
First off, thanks for the great tool -- I've been using it for a while now with great success!

Today I tried using 0.9.211 to convert a pdf to epub (this particular file works in calibre but formats poorly), but java appears to be throwing an exception on this file 411 pages in:

Code:
Desire:Downloads$ soylatte16-i386-1.0.3/jre/bin/java -Xms200M -Xmx300M -jar LRFTools-v0.9.211.jar convertPDF ~/Desktop/ -EPUB
Loading 'In Death.pdf' 431 pages java.util.zip.ZipException: incorrect header check
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
	at org.pdfbox.filter.FlateFilter.decode(FlateFilter.java:97)
	at org.pdfbox.cos.COSStream.doDecode(COSStream.java:290)
	at org.pdfbox.cos.COSStream.doDecode(COSStream.java:235)
	at org.pdfbox.cos.COSStream.getUnfilteredStream(COSStream.java:170)
	at org.pdfbox.pdmodel.common.COSStreamArray.getUnfilteredStream(COSStreamArray.java:200)
	at org.pdfbox.pdfparser.PDFStreamParser.<init>(PDFStreamParser.java:101)
	at org.pdfbox.pdmodel.common.COSStreamArray.getStreamTokens(COSStreamArray.java:141)
	at org.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:202)
	at org.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:174)
	at org.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:110)
	at lrf.pdf.PDFSerializer.procPDF(PDFSerializer.java:91)
	at lrf.pdf.PDFSerializer.recurse(PDFSerializer.java:33)
	at lrf.RecurseDirs.convertPDFActionParams(RecurseDirs.java:242)
	at lrf.RecurseDirs.<init>(RecurseDirs.java:91)
	at lrf.RecurseDirs.main(RecurseDirs.java:41)
Other PDF (and lrf) files I've tried work fine; it may be something particular to this file. Although the zip exception is odd....

Last edited by adinb; 05-17-2009 at 08:49 PM.
adinb is offline   Reply With Quote
Reply


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 11:36 AM.


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