使用K2pdfopt对PDF文件优化, 方便Kindle阅读
不小心把用了6年的Kindle3G压坏,屏幕变花屏了,
只好去Amazon买了个Kindle Paperwhite。
用Kindle读书如果看的是mobi文件绝对是一种享受,
但有时需要看扫描版pdf,比如这本"甲骨文选注",
甲骨文本身无法用文本格式显示,扫描后边缘空间很大,
字的部分很小,所以读起来非常费眼睛。
以前用Kindle3G使用了多看系统,具有自动切边自动重新排版功能,
比Kindle的原生系统要好用的多。
可惜这个系统已经停止开发,于是在网上找了下有没有代替手段,
看到有人介绍这个K2pdfopt软件,而且有Mac版,马上下载试用一下。
下载后看到k2pdfopt没有执行权限,
于是在terminal里执行chmod +x k2pdfopt,
然后把它移动一下mv k2pdfopt /usr/local/bin,
接下来执行$ k2pdfopt 甲骨文选注.PDF
可以看到出现一个命令菜单,呵呵,好有DOS感啊。
k2pdfopt v2.40 (w/MuPDF,DjVuLibre,OCR) (c) 2017, GPLv3, http://willus.com
Compiled Jan 7 2017 with Gnu C v6.2.0 for OS/X on x64.a. Autostraighten (-as) n. Native PDF output (-n)
b. Bitmap type (-jpg,-png,-bpc) o. Output name (-o)
bp. Break pages (-bp,-f2p) oc. OCR (-ocr,-ocrvis,...)
c. Color/Negative output (-c, -neg) om. Output margins (-om)
co. Column detection (-col,-ch,...) p. Page range (-p)
cs. Contrast/Sharpen (-cmax,-g,-s,-wt) pd. Padding/Marking (-p[lrbt],-mc)
d. Device selection (-dev,-h,-w,-dpi) r. Right-to-left page scans (-r)
ds. Document scale factor (-ds) rt. Rotate source page (-sr)
f. Fit to single column (-fc) s. Special (-de,-evl,-gs)
gt. Gap thresholds (-gt...) sm. Show marked source (-sm)
j. Justification (-j) u. Usage (command line opts)
l. Landscape mode (-ls) v. Vertical spacing (-vb,-vs)
m. Margin to ignore (-m) w. Wrap/Reflow text (-wrap,-ws)
mo. Mode (-mode) x. Exit on completion (-x)
Selected options: 甲骨文选注.PDF
支 持 本 站: 捐赠服务器等运维费用,需要您的支持!
然后输入设备选择d命令,
Enter option above (h=help, q=quit): dSelect your e-reader type:
1. Kindle 1-5 (k2)
2. Kindle DX (dx)
3. Kindle Paperwhite (kpw)
4. Kindle Paperwhite 2 (kp2)
5. Kindle Paperwhite 3 (kp3)
6. Pocketbook Basic 2 (pb2)
7. Kindle Voyage (kv)
8. Nook Simple Touch (nookst)
9. Kobo Touch (kbt)
10. Kobo Glo (kbg)
11. Kobo Glo HD (kghd)
12. Kobo Glo HD Full Screen (kghdfs)
13. Kobo Mini (kbm)
14. Kobo Aura (kba)
15. Kobo Aura HD (kbhd)
16. Kobo H2O (kbh2o)
17. Kobo H2O Full Screen (kbh2ofs)
18. Nexus 7 (nex7)
19. Other (specify width, height, etc.)Enter selection [1]: 5
输入5,也就是Kindle Paperwhite 3,接来下貌似还有很多选项,
a. Autostraighten (-as) n. Native PDF output (-n)
b. Bitmap type (-jpg,-png,-bpc) o. Output name (-o)
bp. Break pages (-bp,-f2p) oc. OCR (-ocr,-ocrvis,...)
c. Color/Negative output (-c, -neg) om. Output margins (-om)
co. Column detection (-col,-ch,...) p. Page range (-p)
cs. Contrast/Sharpen (-cmax,-g,-s,-wt) pd. Padding/Marking (-p[lrbt],-mc)
d. Device selection (-dev,-h,-w,-dpi) r. Right-to-left page scans (-r)
ds. Document scale factor (-ds) rt. Rotate source page (-sr)
f. Fit to single column (-fc) s. Special (-de,-evl,-gs)
gt. Gap thresholds (-gt...) sm. Show marked source (-sm)
j. Justification (-j) u. Usage (command line opts)
l. Landscape mode (-ls) v. Vertical spacing (-vb,-vs)
m. Margin to ignore (-m) w. Wrap/Reflow text (-wrap,-ws)
mo. Mode (-mode) x. Exit on completion (-x)Selected options: 甲骨文选注.PDF -dev kp3
再试一下mo选项,值设为tm,
还有很多功能就不一个个尝试了,直接回车,
Enter option above (h=help, q=quit):Reading 373 pages from 甲骨文选注.PDF ...
Detecting document orientation ... No rotation necessary.
SOURCE PAGE 1 of 373 (8.3 x 11.7 in) ... 1 new page saved.
SOURCE PAGE 2 of 373 (8.3 x 11.7 in) ... 1 new page saved.
SOURCE PAGE 3 of 373 (8.3 x 11.7 in) ... 1 new pages saved.
SOURCE PAGE 4 of 373 (8.3 x 11.7 in) ... 1 new pages saved.
SOURCE PAGE 5 of 373 (8.3 x 11.7 in) ... 1 new pages saved.
SOURCE PAGE 6 of 373 (8.3 x 11.7 in) ... 1 new pages saved.
SOURCE PAGE 7 of 373 (8.3 x 11.7 in) ... 1 new pages saved.
SOURCE PAGE 8 of 373 (8.3 x 11.7 in) ... 1 new pages saved.
... ...
这个过程时间很长,发现还是先用-p参数指定少数几页,
直接使用命令行对各个参数实验好再转换比较好,
比如使用-ac参数可以自动切边,但是实际测试该pdf,
还是使用-m来实际指定切边的长短,如下
$ k2pdfopt 甲骨文选注.PDF -x -dev kp3 -mode tm -p 10-25 -m 1cm,1.5cm,1cm,2cm -nt 3
等效果较好。
资源:
官网的k2pdfopt的选项说明页
书多多
留言簿