从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如何反射地迭代数组字段?   java NamedQuery错误“具有给定标识符的多行:1”   java无法使用单独类中的计时器更新TextView   兼容性什么时候可以很快使用新的Java功能?   java二叉树路径和   java矩形的性能   java我想从同一个子表在主表中添加两个外键   java如何获取基于特定日期的所有数据?   java javafx、OO编程规则和写入变量类型的选择   java使用带枚举的switch语句   java异步任务生成运行时异常   java为什么JLabel不显示下划线字符?   java如何解析具有可变参数号的函数?   带有按钮的java JavaFX自定义列表单元格:未调用处理程序   java Modelmapper无法映射整个模型?   传递给持久化的java分离实体,包含LatLng列表