在 Google App Engine 上使用 python 将 HTML 转换为 PDF
我看过这个帖子:
我知道我们可以使用 ReportLab,但是,我不确定如何为其提供 HTML 文件并获取 PDF。
基本上,HTML 输入和 PDF 输出
I have had a look at this thread:
How to dynamically generate a pdf from Google's appengine?
I know we can use ReportLab, however, I am not sure how i can give it a HTML file and get a PDF.
Basically, HTML in and PDF out
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您可以使用外部库,则有 xhtml2pdf
if you can use an external lib, there is xhtml2pdf
试试这个: html-2-pdf.com
它构建于:wkhtmltopdf
使用起来非常简单。它是独立的,因此只需在您的 (Linux) 系统上上传文件,您就可以生成 PDF
Try this: html-2-pdf.com
It's build in top of: wkhtmltopdf
It's really easy to use it. It's stand-alone so just upload a file on your (Linux) system and you are ready to produce PDFs
xhtml2pdf 声明源是纯 python 的。您应该能够将其用作应用程序中的模块。
xhtml2pdf states that the source is pure python. you should be able to use this as a module in your application.