使用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的選項說明頁
書多多
留言簿