<< back to the Conspiracy Knowledge Base


Step 1: Print to image

The first step is to print your e-book to a sequence of JPEG images, one for each page. It does not matter if you print it as JPEG grayscale or JPEG truecolor, because all images (pages) will be converted to truecolor later. Truecolor and grayscale are different types of JPEG. You can, for example, save a grayscale picture as JPEG truecolor. Just remember that grayscale files have smaller sizes compared to their truecolor counterparts, and you may save some storage space in this way. Unfortunately, the SPF-85P's software seems to have trouble decoding JPEG grayscale: photo navigation and thumbnail generation is considerably slower, and that is why in this tutorial we will be working only with JPEG truecolor.

Print a test page to make sure that the printing resolution (DPI) of your virtual printer will not result in images with dimensions lower or much higher than 600×800 (width×height), which is the SPF-85P's maximum resolution after all. The resulting dimensions may also depend on the paper dimensions (e.g., A4, A1, A3) chosen during print setup. If you own a digital frame with a high resolution, then, depending on the overall font size of the source document, you can even try printing two pages per image.

In this tutorial we will work with two sample pages that were printed from a PDF. We could have printed them in monochrome (gray scale), but in certain cases it is better to keep the color data, specially when your e-book has color graphics, pictures, illustrations, etc. As shown below, the initial resolution for both pages is 826×1169.

Make sure that all images are named correctly and in sequence. The virtual printer software should automatically generate numbered filenames so that all you have to do is input "pg" once you are prompted for a location to save. In the screenshot below we can see an e-book with 290 pages and a front cover page.

Step 2: Crop (optional)

We will now begin working with some Windows NT Command (CMD) files and a few handy applications that you should have in your PC even if you do not wish to optimize your e-book for the SPF-85P. At the end of this tutorial there will be download links for all required files. Before proceeding you should reserve a folder as your workspace and include all CMD files in it as well as the pages printed in Step 1. Application files can be saved elsewhere in your system.

Margins can waste precious pixel space on the SPF-85P's screen. Getting rid of margins will make the text larger and thus easier to read. For this we will need two applications: Jpegtran and Jpegcrop. Jpegtran allows us to cut regions out of a JPEG image and then save it in a way that avoids recompression. Each time you re-save a JPEG image you lose quality, unless you are doing this with specialized software such as Jpegcrop, which is merely a graphical user interface for Jpegtran. The screenshot below shows how useful Jpegcrop is for our purpose.

Run Jpegcrop and open one of the pages of your e-book in it. Use the mouse to drag a frame (selection rectangle) over the region that you want to preserve. You should preview each page to make sure that the page you opened is a reasonable representative of all the others, because not all pages in a book have exactly the same layout. After dragging the frame, pay attention to the right end of the status bar where you can see the selection coordinates. You must edit step2-crop.cmd in a text editor and include / customize those coordinates as well as the location where you have saved jpegtran.exe.

step2-crop.cmd
@ECHO OFF

SET _TOOLPATH_=c:\programs\standalone\single\console
REM *DESCRIPTION* enter the location where the application is stored

ECHO.
ECHO INFO: Running Step 2...
ECHO.

IF NOT EXIST out (MKDIR out) ELSE (DEL /Q out)
REM *WARN* all files inside "out" will be deleted.

PAUSE
ECHO.

FOR %%X IN (*.jpg) DO %_TOOLPATH_%\jpegtran.exe -copy all -crop 656x944+80+96 -debug %%X out\%%X
REM *INFO* jpegtran uses "-copy comments" by default.

ECHO.
ECHO ECHO: Press any key to close this window.
PAUSE >nul
CLS

Now you can run step2-crop.cmd. It will run automatically on all JPEGs inside the current folder. The cropped images will be saved to the out directory. Below we can see our two sample pages after they went through Step 2. Notice how it is mostly text that occupies a page now.






Copyright © 2009 Conspiracy Knowledge Base