Linux 3.2.0-24-generic #38-Ubuntu x86_64 GNU/Linux で wkhtmltopdf 0.10.0 rc2 を使用しています。
margin-top
orを使用して PDF を作成できませんmargin-bottom
(エラーなし)
以下のコマンドを使用しています。
wkhtmotopdf -T 50 -B 50 http://google.com ./test.pdf
wkhtmotopdf --margin-top 50 --margin-bottom 50 page.html ./test.pdf
これを試すと:
wkhtmotopdf -L 50 -R 50 -T 50 -B 50 page.html ./test.pdf
左と右のマージンは完璧に機能します (まだマージントップまたはマージンボトムはありません)。どの URL やページを変換するかは問題ではありません。
編集:
バグのようです。まだマージントップ/マージンボトムが必要な人向け。header-html/footer-html 機能を使用してみてください。
header-spacing および footer-spacing パラメータを追加することで、クリッピングの問題が修正されることに気付きました。
wkhtmotopdf -L 50 -R 50 -T 50 -B 50 http://google.com --header-html blank.html --header-spacing 5 --footer-html blank.html --footer-spacing 5 ./test.pdf