Introduction
Updated 2016.09.12: Added notes concerning optimizing PDF files for
Kindle devices, using GhostScript; and likely Poppler PDFtoHTML for
possibly rendering to PDB/PRC/MOBI.
Introduction
Just got my new Amazon Kindle DXG around August 2011. (Yea, it
takes me about 5+ years to buy a new gadget these days.)
It's great being able to finally read & study Linux Manual Pages
without the glare of a computer monitor! Love E-Ink!
I did have some problems finding command line only tools for
converting files to the reader's .mobi format, so I've taken
some time to create some HTML pages documenting my successes and
failures in hopes of making life simpler for others.
The thing I most like about this device and most surprised me, is
it's durability! Unlike a LCD display where you want to keep
your fingers off, you can touch and even press the display with
pressure and it will not bend or flex. It's quite rigid clear
plastic. And because the text appears so much like real text
in a book, at times I find myself flipping the device over to view
the opposite side of the page!
Unlike a real book with the inability to turn pages while in a
jacuzzi, you can put the device into a good quality zip lock bag and
read. To turn the pages, just press the buttons.
Although I hinder at doing this with $400 devices, I've already done
so and see little risk. However, I've yet to drop or submerse
the device while in a ziplock bag intentionally into the water.
Connecting
and Disconnecting the Device on Linux
Make sure you have the following package installed:
sys-block/eject -> http://eject.sourceforge.net/
The Kindle is treated as an ordinary removable media (ie. USB memory
stick) when plugged in. On plug-in, the screen on the device
will let you know it's plugged in and possibly has it's media
mounted, locking you out from until you've safely unmounted
partition.
Your Linux computer will likely create a device file on plug-in such
as /dev/sdb1, or /dev/sdc1, or ...
From here, either your Linux distribution will auto mount the device
using udev to /media/kindle, /mnt/auto, ... It's up to you to
make sure it's mounted as you like. There's little
documentation on using udev or autofs with the Kindles.
To unmount, unmount the device as you usually do for any other
removable media, however notice the screen will still say "USB Drive
Mode". To regain control of the Kindle, issue the eject
command.
# eject /dev/sdc1
or, if you just want to the screen back to normal so you can see the
files you're copying to the device use the "-m" switch to prevent
unmounting:
# eject -m /dev/sdc1
While the device is plugged in, it will charge using USB power (5V @
0.80 AMPS).
NOTE: ALWAYS unmount the device prior to disconnecting, else you
risk data loss -- especially since the partition format is vfat and
not journaled!
Linux
or GNU Documentation in EBook Format
Although there's little Linux or GNU Documentation in EBook format,
I tend to download both the PDF and HTML file of each. I
convert the HTML to MOBI using either kindlegen or
ebook-convert. I then copy, both, a PDF and MOBI version to
the device. I prefer to read the MOBI format as there's a
feature to enter Notes and Highlights as well as Bookmarks.
These notes are saved to a text file on the device, and can copy to
your computer later. Sometimes formating errors happen with
MOBI files, so I have the original formatting with the PDF files.
GNU Manuals Online
- Contains some excellently formated content! I usually get
the .pdf and .html for each tool. I then convert the .html
using Calibre's ebook-converter because those .html files are quite
complex and kindlegen will mangle them. The GNU Manuals either
contain the main documentation for a tool versuses it's manual page,
or they're a duplicate of the tool's manual page.
$ ebook-convert tool.html
tool.mobi --output-profile kindle_dx --language en
(If you want, use an additional --authors "GNU".)
C Programming - A lot of C Programming
Books are available as a free PDF file. This is where you just
have to know what is published and where it is published. Such
as the ISO standards, hence, a good starting point is the IRC C IRC WIKI page as it lists
the most popular books and publications' location.
Python
2.7.1 Tutorial - Somebody has converted the Python 2.7.1
Tutorial to epub. Unfortunately, Python docs are still all
HTML. Kindlegen does pretty good at conveting .epub files to
.mobi:
$ kindlegen
python-tutorial_2.7.1.epub
O'Reilly Media - O'Reilly offers
their books in many formats including PDF, MOBI and EPUB for the
price of one EBook. You can download all formats of the book
you bought without restrictions or DRM. When you buy a
technical book on Amazon, only
a MOBI is available with the likeliness of it being encrypted with
DRM is available -- but the price is usually reduced. I still
buy all other books through Amazon
based on the low price and ease of availability.
GhostScript
For all PDF files, when reading on a gray scale Amazon Kindles with
either 150 or 300 PPI, color PDF files and PDF files containing high
resolution images are too much for these slower generation of Amazon
Kindles! Users of PDF files should immediately render their
PDF files in gray scale, and reduce the resolution of the images to
150-300 PPI.
$ gs -sOutputFile=output.pdf
-sDEVICE=pdfwrite -sColorConversionStrategy=Gray
-dAutoRotatePages=/None -dPDFSETTINGS=/ebook
-dProcessColorModel=/DeviceGray -dCompatibilityLevel=1.4 -dNOPAUSE
-dBATCH -dFirstPage=1 -dLastPage=10 -r150
TheOldFarmersAlmanac-2017.pdf
The parameters are more well documented within the GhostScript
Ps2pdf.htm page. (Edit the link with your installed
version of GhostScript.)
Poppler PDFtoHTML
Another utility for likely converting these larger PDF files to
PRC/PDB/MOBI.
Amazon's Publishing
Kindlegen
A proprietary Linux command line tool.
Where kindlegen fails, converting HTML <TABLE> tags for
usability within the Kindle. There's hack to get <TABLE>
tags viewing correctly within the Kindle is to set <BORDER=0>.
)
Amazon's Free Conversion
You can also send files through Amazon's semi-free conversion
service, but it's not much better formating then the kindlegen's
output.
Amazons's News
& Blogs Subscriptions
Be aware, these newspapers are a smaller content version then the
regular newspaper subscriptions. However, I quite enjoy the
lighter content and I get what I need to know and I'm not forced
into reading Ads and other unnecessary articles, along with the ink
on my hands and the paper is delivered without effort to me in the
mornings!
Unlike the newspaper subscriptions, I like the blog subscripts for
the major news outlets such as Reuters Blog and the New York Times
Blog for two reasons;
1) They overwrite the previous file on a daily basis so there are no
files piling up in my root folder crying to be tended to or deleted,
unlike the regular newspaper subscription files.
2) When you view them, they have an option to view an index of all
article title entries, allowing your to view only the articles you
want to. This is unlike the regular newspaper subscription
because there is no title index entry page, you must view each
article whether you want to or not. The only index you get
with the newspaper subscription is a category of articles page.
3) The service is much like reading Google News, but using E-Ink vs.
a bright computer monitor.
Calibre -
EBook Format Converting Tool
One other gotcha for Linux, if you plan on using Calibre's
command-line ebook-convert tool, you still need X running (for some
dumb reason) to convert a book. Even though it does do
conversion well, I prefer converting the Linux Manual Pages and
other simple text and HTML pages by hand as noted on my other page
here on this site.
Kindle Custom Firmware?
I've done a little research, and have found little to no custom
firmwares for the Kindle. There is a chinese based alternate
firmware for the Kindles, but it doesn't really overwrite the
original firmware and installs itself on the remaining free space of
the internal storage media. You alternate between it and the
Amazon Kindle firmware interface. Since I might have some
personal information on the device, I prefer not to use this.
There have been some attempts to create or modify the device, but
the license agreement you agreed to when buying the device could
cause legal issues. And it seems to be hindering many users
from further hacking, as we do get free mobile/cellular data service
with the device. Hacking could cause you to lose your free
service, and seems to have even bricked some devices.
On the flip, I don't like the idea of being forced not having read
access to common ASCII Text files! Even HTML should be
viewable by the device as it does have an experimental browser
installed. Some prefer to be able to view .epub, as .epub
files are an open format.
Amazon
Kindle DXG Bugs
Although I make note of some issues with the Kindle DXG, it's a well
designed electronic device and will gladly buy a second one!
The following is just for documentation, so buyers are aware prior
to buying or so users can work around them. Also, Amazon may
update the firmware, currently version 2.5.8, fixing many of these
bugs.
1) <TABLE> HTML Tags require a <BORDER=0> work
around. (Search MobileRead
Calibre
forums for specific information.) Also, background colors of
text other then white can cause some reading problems. All
these issues are addressed within
AmazonKindlePublishingGuidelines.pdf for HTML authors to avoid as
kindlegen fumbles with these formatting tags.
2) The page number at the bottom of the notes for .mobi files page
disappears at times when you most need to see it!
3) To view the time, press the menu button. But you only get
the time and no date! For the date, you're required to type
date after opening up a search box. Tedious for such a simple
task!
4) Raw file names are not displayed within the main list of files or
file details. This can cause problems if experimenting viewing
files of different types.
5) There is no clickable Contents Page or Index pages.
However, you can get to a specific page, by pressing the Menu Button
and then entering the specific page number.
6) Sending a document through Amazon's on-line conversion service
replaces the author's field with the sender's email address.