![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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... ![]() 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 ! ![]() |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 2600
Join Date: Oct 2008
Device: PRS-505
|
Opps.... somehow the image was not uploaded...
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() 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!
![]() |
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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....
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() 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. |
![]() |
![]() |
![]() |
#7 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
|
|
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 2600
Join Date: Oct 2008
Device: PRS-505
|
OK... here're the before/after the on-the-go thicken/bolden pictures...
![]() |
![]() |
![]() |
![]() |
#9 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |