![]() |
#1 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
RTFToIliad tool
This tool converts RTF files to iLiad sized PDF files.
Its one redeeming feature is that it can directly convert a Baen ZIP'd RTF file. ![]() As time goes by I'll grow its brain (right now it represents 3 man hours, including writing the RTF parser from scratch) and it will handle more RTF commands to create fancier PDF output. For now, it goes from Baen ZIP file to iLiad sized PDF in a single step. It requires the PDF Box jar from http://www.pdfbox.org Compile it: javac -classpath PDFBox-0.7.2.jar RTFToIliad.java RTFPullParser.java Run it: java -classpath .:PDFBox-0.7.2.jar RTFToIliad DA1416509402.zip UntoTheBreach.pdf |
![]() |
![]() |
![]() |
#2 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Today's version:
Supports Roman, Bold, Italic, Bold Italic Page breaks Paragraph spacing adjustment Flows text better Various bug fixes. Most all of the active Baen formatting commands are working and the output PDF looks much closer to Word's view of it. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
eink fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,022
Karma: 4924
Join Date: Mar 2006
Location: Germany
Device: STAReBOOK, iRex Iliad, Sony 505, Kindle 2
|
Thanks for taking the time to do this Scotty!
I don't use .rtf books myself at the moment, but I'm sure all the users that actually use .rtf books like theose from Baen will love this. Keep up the good work! |
![]() |
![]() |
![]() |
#4 | |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Quote:
I didn't have much use for RTF either but I've found that the Baen RTF downloads are closer to the LIT downloads in terms of readability than the HTML downloads. I use a LIT parser to make my BBeB books but felt an "open" RTF parser was the way to go for the iLiad. Besides, how hard could it be to whip up an RTF parser. ![]() Today is the third posting and with it all the line breaking and page breaking have been implemented. I also cleaned up an RTF bug with \' processing only to discover my good buddy PDFBox only writes out Standard Encoding PDF's. So most of the \' chars are not available in Standard Encoding, oh well... I'll keep picking at it. But I'm not dying for copyright and tilde n characaters so far... The right hand margin gets a bit bent since I turned on the indent for first line support. Working on that one too. Other than that, the Baen titles appear readable to me. Being able to download them and feed them straight through the tool certainly saves me time and fiddling when I buy a new title to read. BTW Java source can be compiled to .exe's with the GCC compiler for those that don't like Java. |
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Oct 2006
Location: Germany
Device: Simpad / Rocket eBook / TabletPC / iLiad / K800i / Cybooke
|
compile issue and fix
Hi scotty1024,
yust tryed to compile and got 2 errors where a explicit typecast was missing. For the ones who don´t know java enough. Problem: RTFPullParser.java:247: isDigit(char) in java.lang.Character cannot be applied to (int) } else if (Character.isDigit(c) || ^ RTFPullParser.java:268: isDigit(char) in java.lang.Character cannot be applied to (int) } else if (Character.isDigit(c)) { fixed it with RTFPullParser.java:247: isDigit(char) in java.lang.Character cannot be applied to (int) } else if (Character.isDigit((char)c) || ^ RTFPullParser.java:268: isDigit(char) in java.lang.Character cannot be applied to (int) } else if (Character.isDigit((char)c)) { So now i have probaly a missing font, later more. ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
What did you try to compile it with?
The standard Sun javac had/has no problems compiling the code to produce the .class files included in the zip file... |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Oct 2006
Location: Germany
Device: Simpad / Rocket eBook / TabletPC / iLiad / K800i / Cybooke
|
![]()
OpenSuse 10
java-1.4.2-sun |
![]() |
![]() |
![]() |
#8 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
|
![]() |
![]() |
![]() |
#9 |
eink fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,022
Karma: 4924
Join Date: Mar 2006
Location: Germany
Device: STAReBOOK, iRex Iliad, Sony 505, Kindle 2
|
@scotty1024
Why don't you start posting your apps and hacks in the Sticky https://www.mobileread.com/forums/showthread.php?t=8167 ? You are doing so many things that it is becoming hard to follow all your efforts. The thread was created specifically for the purpose of making the findings of all mobileread.com "developers" eaiser and fast to find. Thanks. |
![]() |
![]() |
![]() |
#10 |
Gizmologist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
|
I can't follow them even when I find them all.
![]() |
![]() |
![]() |
![]() |
#11 | |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Quote:
You can download it directly from Sun: http://java.sun.com/javase/downloads/index.jsp |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
New tool? | cloggy | Reading and Management | 2 | 08-27-2010 05:13 PM |
iPad as a tool | petermillard | Apple Devices | 1 | 04-13-2010 10:59 AM |
agenda2pdf tool | Iñigo | 1 | 10-04-2009 09:26 AM | |
Prototyping tool | James007 | Reading and Management | 4 | 05-21-2009 10:43 AM |
yet another cropping tool | moggie | 4 | 01-16-2009 04:42 AM |