首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >wkhtmltopdf错误:在错误位置指定

wkhtmltopdf错误:在错误位置指定
EN

Stack Overflow用户
提问于 2016-12-07 09:42:54
回答 1查看 1.6K关注 0票数 3

这是我的shell脚本的一部分,其中${1}是'input.html‘,${2}是'output.pdf':

代码语言:javascript
复制
wkhtmltopdf "${1}" "${2}" --page-size letter --dpi 150 --margin-top 0.2in --margin-bottom 0.2in --margin-left 0.2in --margin-right 0.2in

当我运行上面的代码时,我得到了以下错误:

代码语言:javascript
复制
--page-size specified in incorrect location

我的wkhtmltopdf版本:

代码语言:javascript
复制
$ wkhtmltopdf --version

wkhtmltopdf 0.12.0 final
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-12-07 13:37:24

改为:

代码语言:javascript
复制
wkhtmltopdf --page-size letter --dpi 150 --margin-top 0.2in --margin-bottom 0.2in --margin-left 0.2in --margin-right 0.2in "${1}" "${2}"

而且起作用了。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41014049

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档