简体   繁体   English

Python:使用Reportlab Canvas在PDF中打印Html

[英]Python: Printing Html in PDF using Reportlab Canvas

For one of my python project I am using reportlab's canvas feature to generate pdf document. 对于我的一个python项目,我使用reportlab的canvas功能来生成pdf文档。

Can anyone please help me to print small subset of html (p, strong, ul, ol, li, img, alignments) on reportlab canvas? 任何人都可以帮我在reportlab画布上打印html(p,strong,ul,ol,li,img,alignments)的小部分吗?

Thanks in advance... 提前致谢...

If this is what you are tying to do you should look at using Platypus with ReportLab, a built in set of classes in ReportLab for building documents out of objects representing page elements. 如果这是你要做的事情,你应该考虑使用Platypus和ReportLab,它是ReportLab中的一组内置类,用于从表示页面元素的对象构建文档。 Or, if you want really simple, xhtml2pdf would probably be better. 或者,如果你想要非常简单,xhtml2pdf可能会更好。

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

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