Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-29-2008, 09:52 PM   #1
krtekz
Member
krtekz began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jul 2008
Device: ipod touch, axim x30
chm2sonypdf

So far, I find the following method quite satisfying for reading chm files on Sony Reader, especially for programming related chm documents with a lot of code listings. For these docs, a critical requirement is to preserve the format of code listings. The new PDF reflow feature works well for 'pure text' docs, but might destroys codes.

Step 1: Convert chm to pdf of size exactly the same as reader's viewable area, in landscape mode.
Step 2: Rotate the pdf 90 degrees anticlockwise.

This way, docs are shown in landscape without switching to reader's landscape mode. And no reflow is needed so original format is intact.

I use chm2pdf and pdftk. They are available in standard Debian/Ubuntu repository and might also be in other distributions' repositories. The simple script is here, usage: chm2sonypdf file.chm
Code:
#!/bin/sh
set -x
chm2pdf --webpage --continuous --textfont helvetica --fontsize 10 --size 4.54x3.47in --no-numbered --gray --header . --footer . --no-toc --top 0 --right 0 --bottom 0 --left 0 $1 $1.tmp.pdf
pdftk $1.tmp.pdf cat 1-endW output $1.sony.pdf
rm -f $1.tmp.pdf
BTW, all the internal links are preserved.

sample file attached:
Attached Files
File Type: pdf CPP.excerpt.pdf (121.2 KB, 255 views)

Last edited by krtekz; 07-30-2008 at 08:36 AM.
krtekz is offline   Reply With Quote
Old 07-30-2008, 04:05 AM   #2
lordmax
Enthusiast
lordmax began at the beginning.
 
Posts: 42
Karma: 11
Join Date: Jun 2008
Location: Turin, Italy
Device: iLiad, Opus, cybook gen10, Palm LifeDrive, NetBookVaio, Kindle, Tolino
good idea

Hi

Really good idea.

I've tryied it out and work fine.
Thanks.
lordmax is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
eBook PDF - free tool for creating PDF eBooks from text files KACartlidge PDF 6 01-04-2012 09:41 AM
Cool PDF to iBooks trick using PDF Services in OSX kjk Apple Devices 0 06-30-2010 03:19 PM
【Best PDF Size】I find The reason of slowing When Read PDF file linlance Sony Reader 0 03-11-2010 08:13 AM
PDF Reader for internal PDF hyperlinks? andrewscheinman iRex 1 12-25-2008 08:17 PM


All times are GMT -4. The time now is 04:13 PM.


MobileRead.com is a privately owned, operated and funded community.