Tuesday, July 13, 2010

Zooming PDF files for Nook.

I just got a Barnes & Noble Nook.  It's a great little reader based on Android with a standard e-ink display and an additional LCD display for navigating quickly to the book and page you would like to read.  The most annoying feature was it's handling of PDF files.  If I chose the font "small" I got a full page display of the PDF as if it were a small print out.  Any larger font caused the PDF to be improperly re-flowed - severely re-aligning source code such to make it completely unreadable.  Worse, the "small" font preserved the thick book-like margins found in the original PDF, which caused the text to be uncomfortably small.  What I wanted was to zoom into the page, cropping out the margins.  Here's how to crop out the margins using a PC:
  1. Install pdfedit.  Under Ubuntu, it's found in the Synaptic Package Manager for one-click installation.  Under Windows, the installation process is quite involved.
  2. Open your e-book in PDF edit. 
  3. Choose page->edit page metrics (alt-p, d)
  4. Adjust the top four boxes until the PDF is cropped the way you want it to be for the current page by changing one at a time, and applying it to the page.  Don't worry, no data is lost, and you can always just change the number back if you make a mistake.
  5. Once you are sure that the numbers are set the way you want them, adjust the bottom two boxes to change all pages (Apply from = 1, How many=999999999).
  6. Before doing step 2, you may have to open pdfedit and before opening a pdf, delinearize your PDF using the Tools->delinearize option to open the original pdf and re-save it to another file. 
Finally, if pdfedit has any other trouble opening the file, the PDF may be damaged.  Under Ubuntu, I use the command pdftk to repair my file.  Pdftk is available in The Synaptic Package Manager.  Here's the command:

pdftk input.pdf output output.pdf

No comments:

Post a Comment

AddThis

Bookmark and Share