嗨!因此,我在Ubuntu终端的script中使用wkhtmltopdf工具...
#!/bin/bash
#search for every '*.html' extension and store it in 'output.txt' file
find /home/guidine/09 -name '*.html' > output.txt
#read 'output.txt' file executing the command 'wkhtmltopdf' syntax for each line
for word in $(cat /home/guidine/bin/output.txt)
do
$wkhtmltopfd $word $word".pdf"
done
哪个返回“ output.txt”中的每一行(它是路径),并带有“权限被拒绝”消息(示例为附件,任何人都可以帮我吗?
我已经做过$ chmod +x wkhtmltopdf.sh
。
[我找到了让我满意的替代方法,并且我正在解决问题。
find <directory> -name '*.html' -exec wkhtmltopdf {} {}.pdf \;
[我找到了让我满意的替代方法,并且我正在解决问题。
find <directory> -name '*.html' -exec wkhtmltopdf {} {}.pdf \;