View Single Post
Old 07-21-2008, 05:29 PM   #1
Hanselda
Enthusiast
Hanselda began at the beginning.
 
Posts: 42
Karma: 12
Join Date: Feb 2008
Device: CyBook, Sony PRS 600
A brute force method to read PDF files on Cybook

The idea is simple. We all know the pdf support on Cybook sucks. But at least it can display the jpg quite OK. Then just convert the pdf to jpg, that's it. So here comes the dirty script.

Usage: prepare_pdf file.pdf, then follow the questions.

The script will convert every page into several jpg files to fit the Cybook screen. Usually you can have 2-3 images per page if the page is set to 'landscape' mode in the script. All the images should be viewed on cybook in landscape and fit page mode, since the script will do all the slicing and rotation on the computer. On Cybook you simply press left to turn pages. You can also crop the page if you don't like any margin. At last you can compress all the images into one pdf file. This pdf can be opened on Cybook.

What you need:
python
imagemagick
pdftoppm (from ghostscript)
pdfimage (from pdflib)

changed in V3:
Add the two columns mode. The page can be sliced into two regions and viewed separately.
Now the program can continue with the viewer window kept open.
Use multiple threads for imagemagick. The converting process should be faster.
Attached Files
File Type: zip prepare_pdf.zip (3.9 KB, 482 views)
File Type: zip prepare_pdf_v2.zip (4.0 KB, 435 views)
File Type: zip prepare_pdf_v3.zip (4.3 KB, 480 views)

Last edited by Hanselda; 08-11-2008 at 03:15 AM.
Hanselda is offline   Reply With Quote