简体   繁体   English

在Google App Engine上的python中将HTML转换为PDF

[英]Convert HTML to PDF in python on Google App Engine

I have had a look at this thread: 我看了一下这个线程:

How to dynamically generate a pdf from Google's appengine? 如何从Google的appengine动态生成pdf?

I know we can use ReportLab, however, I am not sure how i can give it a HTML file and get a PDF. 我知道我们可以使用ReportLab,但是,我不确定如何给它提供HTML文件并获取PDF。

Basically, HTML in and PDF out 基本上,HTML输入和PDF输出

如果可以使用外部库,则有xhtml2pdf

Try this: html-2-pdf.com 试试这个: html-2-pdf.com

It's build in top of: wkhtmltopdf 它建立在: 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 它是独立的,因此只需在(Linux)系统上上传文件,即可准备生成PDF

xhtml2pdf states that the source is pure python. xhtml2pdf指出源是纯python。 you should be able to use this as a module in your application. 您应该可以将其用作应用程序中的模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM