2012-09-24 01:30:41 +04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
file=$1
|
|
|
|
name=${file%.*}
|
|
|
|
|
|
|
|
echo 'Printing…'
|
|
|
|
|
2012-09-24 10:40:42 +04:00
|
|
|
# http://code.google.com/p/wkhtmltopdf
|
2012-09-24 01:30:41 +04:00
|
|
|
wkhtmltopdf -T 0 -R 0 -B 0 -L 0 --page-width 1024px --page-height 640px --dpi 300 --print-media-type --quiet ${file} ${name}.pdf
|
|
|
|
|
2012-09-24 10:40:42 +04:00
|
|
|
# http://princexml.com
|
|
|
|
# prince -i html5 ${file}
|
|
|
|
|
2012-09-24 01:30:41 +04:00
|
|
|
echo 'Finished.'
|
|
|
|
|
|
|
|
# Usage example: sh print.sh index.html
|