01-20-2009, 02:31 PM | #106 | |
Enthusiast
Posts: 31
Karma: 60
Join Date: Mar 2007
Device: Sony Reader
|
Quote:
eg: edit, as root, a new file /usr/local/bin/cmd make it read as so: Code:
#!/bin/bash xterm -hold -e "$@" Code:
sudo chmod a+x /usr/local/bin/cmd You can test it by trying out: Code:
cmd ls -l /etc If you're feeling industrious, you could try to find out where lrftools is calling cmd, and change it call bash instead. Last edited by yargoflick; 01-20-2009 at 02:39 PM. |
|
01-21-2009, 12:15 AM | #107 |
Connoisseur
Posts: 54
Karma: 146
Join Date: Mar 2008
Device: E-Book Reader
|
Sorry for not able to make it Linux compatible. First, I don't use Linux and thus can't test. Second, I have tried calling "jave.exe -jar" directly by either Runtime.getRuntime().exec() or ProcessBuilder(), the gui just keep looping.
|
Advert | |
|
01-21-2009, 05:07 AM | #108 | |
Wizard
Posts: 1,154
Karma: 3252017
Join Date: Jan 2008
Location: Germany
Device: Pocketbook Touch Lux (623)
|
Quote:
Did I understand that right? You're using a GUI written in Java to call another program, also written in Java, and you're calling "jave.exe -jar" directly by either Runtime.getRuntime().exec() or ProcessBuilder()?! That strikes me as, sorry for the language, bass ackwards. Why not just directly call the main() method of the main class from the LRFTools jar with the arguments as a string array instead? It's nice, clean, simple, and most of all, platform independent. If you don't want to wait for the program to return, use a separate thread to run the LRFTools from the GUI... |
|
01-21-2009, 05:44 AM | #109 | |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
Quote:
Also, if you want to see progress, before calling to the above static method; you can assign to System.out and System.err two new PrintStreams, and then periodically show their contents to a frame on your GUI. Thanks to all, Eladio |
|
01-23-2009, 12:52 AM | #110 |
Banned
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Well, sounds like a proper solution might be in the offing. In the meantime, I will try yargoflick's workaround.
Thanks all, m a r |
Advert | |
|
02-02-2009, 05:15 PM | #111 |
Junior Member
Posts: 1
Karma: 10
Join Date: Feb 2009
Device: iphone
|
Quotes and other characters with -EPUB (works with -XML)
Many thanks to Eladio for a great tool!
One of my .lrf files gives some problems with quotes and other characters. When I convert it with -XML I get correct text like: <Tag Type="BeginP"/> Vili glanced up, turned his head back toward the interior, and said, with no par ticular inflection, "Klava with honey for Lord Taltos." He then turned back to m e and said, "Your usual table is available, m'lord." <Tag Type="EndP"/> while using -EPUB gives the same paragraph as: <div class="st012"><span class="st013">Vili glanced up, turned his head back toward the interior, and said, with no particular inflection, ñKlava with honey for Lord Taltos.î He then turned back to me and said, ñYour usual table is available, mÍlord.î</span></div> In the EPUB version the ñ should be ", Í should be ', etc. The linebreaks in the XML output also look strange to me. I'll sent the problematic .lrf file to Eladio by pm. For what it's worth, this is under OS X 10.5.6 with java -version: java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) Matt. |
02-06-2009, 12:48 PM | #112 | |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
Quote:
|
|
02-08-2009, 02:00 PM | #113 |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
New version 0.9.175
Uploaded to google code. Please look first post.
|
02-28-2009, 05:09 PM | #114 |
Enthusiast
Posts: 26
Karma: 38
Join Date: Jan 2008
Location: Franklin, TN USA
Device: iPad, iPhone, Kindle 2 US, Sony PR-505
|
Thank you for this tool! Was wondering if you could offer an option in the PDF conversion to retain the "smartquotes" ( “ and ” ) instead of converting them all to plain ones ( " ) ?
thanks again John Last edited by hybernation; 02-28-2009 at 05:44 PM. |
03-01-2009, 05:38 AM | #115 |
Wizard
Posts: 1,686
Karma: 874275
Join Date: Nov 2008
Location: Virginia Beach, VA
Device: Kindle DX
|
For some reason I cant get this to even work... Here is the messages that I get (I am using Java 1.5.0_15)
Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001. G:\LRFTOOLS>java -Xms200M -Xmx300M -jar LRFTools.jar view 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(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknow n Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) I tried it on my Mac and I get something similar... I am pulling my hair out!!! |
03-01-2009, 05:40 AM | #116 |
Wizard
Posts: 1,686
Karma: 874275
Join Date: Nov 2008
Location: Virginia Beach, VA
Device: Kindle DX
|
Ooops... I dont know how to delete duplicate messages...
Last edited by rcuadro; 03-01-2009 at 05:44 AM. |
03-01-2009, 12:48 PM | #117 | |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
Quote:
You must use Java 1.6... |
|
03-01-2009, 12:54 PM | #118 | |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
Quote:
Code:
public static String toXMLText(String app) { app=app.replace('\u000C', ' '); app=app.replace("’", "'"); app=app.replace("'", "'"); app=app.replace("‘", "'"); app=app.replace("\"", """); app=app.replace("“", """); app=app.replace("”", """); app=app.replace(" & ", " & "); app=app.replace("<", "<"); app=app.replace(">", ">"); app=app.replace("’", "'"); app=app.replace("—", "-"); app=app.replace("…", "..."); app=app.replace("’", "'"); app=app.replace("Æ", "AE"); app=app.replace("á", "á"); app=app.replace("é", "é"); app=app.replace("í", "í"); app=app.replace("ó", "ó"); app=app.replace("ú", "ú"); app=app.replace("Á", "Á"); app=app.replace("É", "É"); app=app.replace("Í", "Í"); app=app.replace("Ó", "Ó"); app=app.replace("Ú", "Ú"); app=app.replace("ñ", "ñ"); app=app.replace("Ñ", "Ñ"); return app; } |
|
03-01-2009, 07:30 PM | #119 |
Enthusiast
Posts: 26
Karma: 38
Join Date: Jan 2008
Location: Franklin, TN USA
Device: iPad, iPhone, Kindle 2 US, Sony PR-505
|
I tried to post this on Google Code but for some reason after typing in the whole thing, the submit button wasn't enabled! :-)
What steps will reproduce the problem? 1. download this free ebook: http://www.pyrsf.com/crookedletterPDF.html 2. run the command 3. see stack trace below What is the expected output? What do you see instead? C:\LRFTools>java -Xms200M -Xmx300M -jar LRFTools-v0.9.175.jar convertPDF CL Loading 'CrookedLetterSmall.pdf' 519 pages -java.lang.ArrayIndexOutOfBoundsExcep tion: -1 at java.util.Vector.get(Vector.java:696) at lrf.pdf.flow.Flower.managePieces(Flower.java:123) at lrf.pdf.PDFSerializer.procPDF(PDFSerializer.java:9 6) at lrf.pdf.PDFSerializer.recurse(PDFSerializer.java:3 3) at lrf.RecurseDirs.convertPDFActionParams(RecurseDirs .java:239) at lrf.RecurseDirs.<init>(RecurseDirs.java:89) at lrf.RecurseDirs.main(RecurseDirs.java:39) What version of the product are you using? On what operating system? v0.9.175 on Windows Vista HP 32-bit JDK 1.6.0_13 Please provide any additional information below. It does the same thing with SOME other PDF files I have tried. I had JDK 1.6.0_11 installed originally, so I updated to _12 (the latest)...does the same thing. |
03-02-2009, 02:37 AM | #120 |
Wizard
Posts: 1,686
Karma: 874275
Join Date: Nov 2008
Location: Virginia Beach, VA
Device: Kindle DX
|
|
|
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 |