Trik dan Tip Teknologi Terbaru

Sunday, April 25, 2010

Konversi CHM ke PDF di Ubuntu 8.04/8.10 Linux

E book dalam bentuk CHM lebih bagus dan dapat diandalkan bila ada kadang membacanya di Hand phone Anda. Beberapa file PDF bila di reflow menjadi amburadul, atau bahkan ada yang tidak bisa di reflow sama sekali.

Walau demikian bila Anda tetep berkeinginan untuk merubah file CHM Anda ke file PDF dalam sistem opersi Ubuntu 8.04/8.10 Linux maka lakukan langkah berikut :

Langkah berikut sudah saya tes di Ubuntu 8.04/8.10 saya dan berhasil. Nah di versi yang lain silahkan dicoba.

1. Instal program chm2pdf dengan perintah

rusydi@Research6:~$ sudo apt-get install chm2pdf
[sudo] password for rusydi:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
htmldoc htmldoc-common libchm-bin libfltk1.1
The following NEW packages will be installed:
chm2pdf htmldoc htmldoc-common libchm-bin libfltk1.1
0 upgraded, 5 newly installed, 0 to remove and 158 not upgraded.
Need to get 5895kB of archives.
After this operation, 10.5MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
WARNING: The following packages cannot be authenticated!
libchm-bin htmldoc-common libfltk1.1 htmldoc chm2pdf
Install these packages without verification [y/N]? Y
Get:1 http://in.archive.ubuntu.com intrepid/universe libchm-bin 2:0.39-9 [19.9kB]
Get:2 http://in.archive.ubuntu.com intrepid/main htmldoc-common 1.8.27-3 [5192kB]
Get:3 http://in.archive.ubuntu.com intrepid/main libfltk1.1 1.1.9-4 [460kB]
Get:4 http://in.archive.ubuntu.com intrepid/main htmldoc 1.8.27-3 [202kB]
Get:5 http://in.archive.ubuntu.com intrepid/universe chm2pdf 0.9.1-0ubuntu3 [19.9kB]
Fetched 5895kB in 47s (124kB/s)
Selecting previously deselected package libchm-bin.
(Reading database ... 145973 files and directories currently installed.)
Unpacking libchm-bin (from .../libchm-bin_2%3a0.39-9_i386.deb) ...
Selecting previously deselected package htmldoc-common.
Unpacking htmldoc-common (from .../htmldoc-common_1.8.27-3_all.deb) ...
Selecting previously deselected package libfltk1.1.
Unpacking libfltk1.1 (from .../libfltk1.1_1.1.9-4_i386.deb) ...
Selecting previously deselected package htmldoc.
Unpacking htmldoc (from .../htmldoc_1.8.27-3_i386.deb) ...
Selecting previously deselected package chm2pdf.
Unpacking chm2pdf (from .../chm2pdf_0.9.1-0ubuntu3_all.deb) ...
Processing triggers for man-db ...
Setting up libchm-bin (2:0.39-9) ...
Setting up htmldoc-common (1.8.27-3) ...
Setting up libfltk1.1 (1.1.9-4) ...

Setting up htmldoc (1.8.27-3) ...

Setting up chm2pdf (0.9.1-0ubuntu3) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Processing triggers for python-support ...
rusydi@Research6:~$

2. Langkah berikutnya adalah memahami sintaks chm2pdf. Sintaksnya adalah sebagai berikut

rusydi@Research6:~$ chm2pdf
Usage:
/usr/bin/chm2pdf [options] input_filename [output_filename]

3. Misal Saya mempunyai file bernama High.pdf maka contoh penggunaan adalah sebagai berikut :

Unstructured HTML dalam file CHM gunakan opsi --webpage akan menghasilkan High.pdf:

chm2pdf --webpage High.chm

Structured file HTML :

chm2pdf --book High.chm

Structured file HTML, menghasilkan daftar isi secara otomatis (opsi --title):

chm2pdf --book --title High.chm

Structured file HTML, menghasilkan daftar isi otomatis (--title option), dan menambahkan halaman judul yang ditemukan di file toc.html dalam file CHM:

chm2pdf --book --title --titlefile toc.html High.chm


Jika Anda ingin mengetahui opsi yang lain maka silahkan buka help nya sebagai berikut

chm2pdf --help

Berikut karena High.chm adalah file CHM terstruktur maka saya menggunakan perintah berikut

rusydi@Research6:~$ chm2pdf --book --title --titlefile toc.html High.chm
PAGES: 346
BYTES: 2943463
Written file High.pdf
Done.
rusydi@Research6:~$

Catatan, nama file harus sesederhana mungkin, jangan pake spasi, koma dll.

No comments:

Post a Comment