Linux:pdftohtml・pdfをhtmlに変換
pdfをhtmlに変換してくれるアプリ、pdftohtml
pdf内の写真も勝手に取り出してなんとなく配置してくれる
写真の向きが上下逆さまになったりして、再調整は必要だが、そこそこ使える
使い方
$ mkdir hoge && pdftohtml test.pdf hoge/index.html Page-1 Page-2 Page-3 $ ls hoge index-2_1.jpg index-2_4.jpg index-3_2.jpg index-3_5.jpg index_ind.html index-2_2.jpg index-2_5.jpg index-3_3.jpg index-3_6.jpg indexs.html index-2_3.jpg index-3_1.jpg index-3_4.jpg index-3_7.jpg index.html
そのまま実行するとpdfファイルと同じ階層に写真をぶちまけてしまうので、先にディレクトリを作成してその中にhtmlファイル名を指定する。
Debian系でのインストール
$ sudo apt-get install poppler-utils
poppler-utils パッケージには、その他にも以下のようなアプリが含まれている
- pdffonts -- font analyzer
- pdfimages -- image extractor
- pdfinfo -- document information
- pdfseparate -- page extraction tool
- pdftocairo -- PDF to PNG/JPEG/PDF/PS/EPS/SVG converter using Cairo
- pdftohtml -- PDF to HTML converter
- pdftoppm -- PDF to PPM/PNG/JPEG image converter
- pdftops -- PDF to PostScript (PS) converter
- pdftotext -- text extraction
- pdfunite -- document merging tool