Reading arguments from stdin
If you need to convert a lot of pages in a batch, and you feel that wkhtmltopdf is a bit too slow to start up, then you should try --read-args-from-stdin
, When --read-args-from-stdin
each line of input sent to wkhtmltopdf on stdin will act as a separate invocation of wkhtmltopdf, with the arguments specified on the given line combined with the arguments given to wkhtmltopdf
For example one could do the following:
echo “http://qt-project.org/doc/qt-4.8/qapplication.html qapplication.pdf” >> cmds
echo “cover google.com http://en.wikipedia.org/wiki/Qt_(software) qt.pdf” >> cmds
wkhtmltopdf —read-args-from-stdin —book < cmds
当前内容版权归 wkhtmltopdf 官网 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 wkhtmltopdf 官网 .