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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-09-2010, 10:26 AM   #1
DairyKnight
Connoisseur
DairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with others
 
Posts: 63
Karma: 2600
Join Date: Oct 2008
Device: PRS-505
muPDF on Kindle DX!!

I have just ported muPDF to Kindle DX, in order to replace the crappy built-in PDF reader. Though still with some bugs and lack a GUI, it could correctly read and render PDF files - see the picture below.

Rough steps to do the magic (for experienced user only ):

1. Download scratchbox arm-eabi prebuilt toolchain. If you are an unlucky Mac user (just as I am...), you'll have to build the toolchain yourself. I used CodeSourcery's patched sources and the makefile from http://fanplastic.org/gcc-for-arm-eabi/ . You'll need macports' patched gmp and mfpr as well. As CodeSourcery's source doesn't have glibc, linux kernel and glibc sources from Amazon site is also necessary.

2. Go get mupdf's source and add the following code to the Jamrules file:


if $(OS) = KINDLE
{
BUILD_X11APP = false ;
CC = {your arm-gcc} ;
CCFLAGS = -march=armv6j {necessary includes and libs directory, you will need to build freetype, zlib, and jpeglib with your arm-gcc} ;

APPLINKLIBS = -lpthread ;

if $(BUILD) = debug { OPTIM = -g -O0 -fno-inline ; }
if $(BUILD) = release { OPTIM = -O3 ; }

#if $(HAVE_JBIG2DEC) { LINKLIBS += -ljbig2dec ; }
#if $(HAVE_OPENJPEG) { LINKLIBS += -lopenjpeg ; }
}

# Dont forget the 'space' before the ; on each variable line !! It is imperative for ftjam.

3. You will need to first build mupdf with:
ftjam OS=LINUX to have the font/cmap generator. copy those executables to build/kindle-x86-debug (no time to polish the script to have better looking names )
and then:
ftjam OS=KINDLE

You might run into problems with gcc, as the keyword 'restrict' used by muPDF is only available for g++. I just did a '#define restrict ' to fix this, but I believe some gurus could provie a more elegant way.

4. Now you should have all the '.a' files ready for muPDF. I just did some slight modification to pdfapp.c for it to work with Kindle DX.
The trick for e-ink display is to write '/dev/fb0', and refresh using: 'echo 2 > /proc/eink_fb/update_display'. There're other commands for this device. You can check the qindle source for details.

And to clear the screen, run 'eips -c' on kindle terminal.

Well, then you have a full functioning PDF reader on Kindle!! Now what's next? hmmm... I can already start thinking about unrestricted zooming, bookmarks, notes, PDF links, smart-crop.... so much more exciting features possible !
DairyKnight is offline   Reply With Quote
Old 03-09-2010, 10:28 AM   #2
DairyKnight
Connoisseur
DairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with others
 
Posts: 63
Karma: 2600
Join Date: Oct 2008
Device: PRS-505
Opps.... somehow the image was not uploaded...
Attached Thumbnails
Click image for larger version

Name:	dxmupdf.jpg
Views:	1580
Size:	55.2 KB
ID:	47600  
DairyKnight is offline   Reply With Quote
Advert
Old 03-12-2010, 04:41 PM   #3
geekraver
Addict
geekraver ought to be getting tired of karma fortunes by now.geekraver ought to be getting tired of karma fortunes by now.geekraver ought to be getting tired of karma fortunes by now.geekraver ought to be getting tired of karma fortunes by now.geekraver ought to be getting tired of karma fortunes by now.geekraver ought to be getting tired of karma fortunes by now.geekraver ought to be getting tired of karma fortunes by now.geekraver ought to be getting tired of karma fortunes by now.geekraver ought to be getting tired of karma fortunes by now.geekraver ought to be getting tired of karma fortunes by now.geekraver ought to be getting tired of karma fortunes by now.
 
Posts: 364
Karma: 1035291
Join Date: Jul 2006
Location: Redmond, WA
Device: iPad Mini,Kindle Paperwhite
Very cool! I hope you keep developing this; it would be great to have a PDF reader with more functionality.
geekraver is offline   Reply With Quote
Old 03-13-2010, 07:59 AM   #4
diathermic
Junior Member
diathermic began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2009
Location: Berkeley, CA
Device: Kindle DX
Super exciting! I can't wait to see some support for Bookmarks! Thanks!
diathermic is offline   Reply With Quote
Old 03-16-2010, 09:04 AM   #5
DairyKnight
Connoisseur
DairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with others
 
Posts: 63
Karma: 2600
Join Date: Oct 2008
Device: PRS-505
Just added a 'On-the-Go text thicken & bolden', which uses FreeType2's Font Embolden algorithm. - Apparently, it is much faster than my algorithm based on metamorphism....
DairyKnight is offline   Reply With Quote
Advert
Old 03-17-2010, 07:27 AM   #6
frediz
Member
frediz began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Mar 2009
Device: prs 505
Hi,

I'm quite interested in your progress on porting this pdf viewer, especially with zoom support
I saw in another thread a pdfviewer in qtembedded (thus in qindle too, cdisou posted some pictures)
Why did you finally go to mupdf instead of working on that qt pdfviewer ?

Last edited by frediz; 03-17-2010 at 10:29 AM.
frediz is offline   Reply With Quote
Old 03-21-2010, 01:23 AM   #7
DairyKnight
Connoisseur
DairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with others
 
Posts: 63
Karma: 2600
Join Date: Oct 2008
Device: PRS-505
The most important thing is... I don't know how to do Qt programming...

Kidding..... muPDF is more lightweighted, and I don't need to deal with library dependencies and the complicated UI.


Quote:
Originally Posted by frediz View Post
Hi,

I'm quite interested in your progress on porting this pdf viewer, especially with zoom support
I saw in another thread a pdfviewer in qtembedded (thus in qindle too, cdisou posted some pictures)
Why did you finally go to mupdf instead of working on that qt pdfviewer ?
DairyKnight is offline   Reply With Quote
Old 03-21-2010, 03:26 AM   #8
DairyKnight
Connoisseur
DairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with others
 
Posts: 63
Karma: 2600
Join Date: Oct 2008
Device: PRS-505
OK... here're the before/after the on-the-go thicken/bolden pictures...
DairyKnight is offline   Reply With Quote
Old 03-21-2010, 03:39 AM   #9
DairyKnight
Connoisseur
DairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with othersDairyKnight plays well with others
 
Posts: 63
Karma: 2600
Join Date: Oct 2008
Device: PRS-505
Somehow I cannot upload images... go to
http://www.hi-pda.com/forum/viewthre...id%3D68&page=2

to have a look
DairyKnight 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
The Frugal Kindle ~ Frugal Finds Under $9 for the Kindle (Kindle eBook Resource) eTrubrown Self-Promotions by Authors and Publishers 3 10-10-2010 06:12 PM
Transfer Kindle books from Kindle PC to Kindle 3 ppearce Amazon Kindle 15 09-16-2010 05:11 PM
Font hacks for the Kindle 2, Kindle International and Kindle DX edge777 Kindle Developer's Corner 17 04-30-2010 04:11 PM
$0.01 in Kindle Store: Interactive Sudoku for Kindle 2 and Kindle DX - Volume 1 Xia Deals and Resources (No Self-Promotion or Affiliate Links) 2 11-07-2009 10:06 AM


All times are GMT -4. The time now is 11:39 AM.


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