サイトのスクリーンショットを撮る「wkhtmltopdf」
サイトのスクリーンショットを撮る必要があったので「wkhtmltopdf」を使用することにしました。インストール・コマンドをメモしておきます。
Linux64-Bit版へのインストール
# cd /usr/local/src # wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.0/wkhtmltox-linux-amd64_0.12.0-03c001d.tar.xz # tar -Jxvf wkhtmltox-linux-amd64_0.12.0-03c001d.tar.xz # cp wkhtmltox/bin/wkhtmltoimage /usr/local/bin/
コマンド
# wkhtmltoimage http://google.com google.jpg
画質の指定
# wkhtmltoimage --quality 50 http://google.com google.jpg
幅・高さの指定
# wkhtmltoimage --height 800 --width 1280 http://google.com google.jpg