从html内容创建漂亮的pdf报告。

pdf_reports的Python项目详细描述


Travis CI build statushttps://coveralls.io/repos/github/Edinburgh-Genome-Foundry/pdf_reports/badge.svg?branch=master

pdf reports(完整文档here)是一个python库,用于从html或Pug模板创建漂亮的pdf报告。它具有外观现代的组件(通过Semantic UI框架),并提供了在文档中嵌入表或图的例程。

使用示例

您的pug模板文件template.pug可能如下所示(请参见afull example):

#sidebar I am the text in the sidebar.

h1 {{ title }}

.ui.piled.segmentp Oh hi there ! I am some text in a cool box.

您的python代码如下:

frompdf_reportsimportpug_to_html,write_reporthtml=pug_to_html("template.pug",title="My report")write_report(html,"example.pdf")

最后的结果可能是这样的(PDF file):

https://github.com/Edinburgh-Genome-Foundry/pdf_reports/raw/master/screenshot.png

信息

pip安装:

pip install pdf_reports

web文档:

https://edinburgh-genome-foundry.github.io/pdf_reports/

github页

https://github.com/Edinburgh-Genome-Foundry/pdf_reports

现场演示

http://cuba.genomefoundry.org/sculpt_a_sequence

许可证:麻省理工学院,爱丁堡基因组铸造厂版权所有

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何避免springbootstarterparent和dependency中的flyway包冲突   java文本文件写入不起作用   java获取名为DAO类的Bean创建异常   java类路径和清单文件   如何使用Java中的模式来获取像C中的“sscanf”这样的组?   java Spring自动连接具有构造函数的类   clientSecurity运行的java geode示例失败   java JavaFX:在FXML中从ResourceBundle访问非string对象   java登录到google firebase   java对象在通过构造函数后不会更改。为什么?   java(Android)对特定页面的操作webView   javascript如何在webview的js中从java调用变量   持久化—一种在Java中存储和检索对象而不使用关系数据库的简单方法?   java Ldap获取通讯组列表中的用户   java检查温度条件   java后退按钮警报框(Android Studio)   数组java列表问题:为什么我运行它时,它会在第三次打印时打印出4?   java相对路径与绝对路径