无法在ADO管道内的Python中从多个html文件创建pdf
无法在 ADO 管道内的 python 中从多个 html 文件创建 pdf,但如果我传递一个文件,则会生成报告。
bash 内部:
sudo apt-get update --fix-missing
sudo apt-get install -y wkhtmltopdf
Python 脚本:
frontPage = os.path.join(fileName, 'frontPage.html')
index = os.path.join(fileName, 'index.html')
// providing 1 file
pdfkit.from_file([fileName],"report.pdf") //works perfectly fine
// providing multiple files
pdfkit.from_file([frontPage, index],"report1.pdf") //showing error
错误: 但对于单个 HTML 文件,正在工件中创建报告。并且 HTML 文件的路径是正确的。
期望生成具有多个 html 的 PDF
unable to create pdf from multiple html files in python inside ADO pipeline, but if I pass one single file then the report is being generated.
inside bash:
sudo apt-get update --fix-missing
sudo apt-get install -y wkhtmltopdf
Python script:
frontPage = os.path.join(fileName, 'frontPage.html')
index = os.path.join(fileName, 'index.html')
// providing 1 file
pdfkit.from_file([fileName],"report.pdf") //works perfectly fine
// providing multiple files
pdfkit.from_file([frontPage, index],"report1.pdf") //showing error
error:
but for single HTML file, report is being created in artifacts.and the path of the HTML files are correct.
expecting to generate PDF with multiple htmls
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论