View Single Post
Old 06-20-2009, 09:00 PM   #2
tklaus doesn't littertklaus doesn't litter
tklaus's Avatar
Posts: 71
Karma: 131
Join Date: Nov 2007
Location: San Jose, CA
Device: iPad, Kindle DX
The simplest approach would be to get one of the free PDF print drivers, like CutePDF and simply print the source code from your favorite editor or IDE. This would preserve all of the layout and syntax highlighting provided by your editor, but unless your editor/IDE has 'print all' or similar capability, you might end up with one pdf per source file, which is probably not what you want.

A better option is to get one of the many source code to HTML converters out there. That approach not only preserves the layout and syntax highlighting, but in many cases gives you a navigable document. For example, you can click on a method call and it takes you to the definition of that method like many IDE's. You can convert the HTML to the Kindle's MOBI format with tools like calibre or Mobipocket Creator.
tklaus is offline   Reply With Quote