跳转到主要内容

根据西班牙法规创建PDF发票。

项目描述

Latest Version

根据西班牙法规创建PDF发票。

使用

检查tests/tests_functional.py和facturapdf/strategies文件。

生成器

为了简化创建pdf flowables,可以使用生成器函数。

元素生成器

基于给定字符串创建一个flowable。检查元素函数以查看可用的元素。参数在括号内给出,由管道(|)分隔。

# Generates a Image flowable with 25 mm of width
generators.element('image[logo.jpg|25]')

# Generates a FrameBreak flowable
generators.element('framebreak')

章节生成器

通过传递任意数量的字符串参数创建一个flowables列表。

generators.chapter('Paragraph[Cat in the hat]', 'image[hat.jpg|25]')

# Passing a string that is not a valid flowable keyword or anything that is not a string will do nothing
# So you can mix chapter generator with another one at once
generators.chapter('hello', [1, 2, 3]) # will return ['hello', [1, 2, 3]]

测试

$ python -m unittest discover

检查tests/output文件夹中的输出文件。

变更日志

  • 0.0.4 (2015-02-03)
    • 升级reportlab版本到3.1.44以修复与pillow的问题

    • 修复Python 3

    • 测试基础设施的几个改进:添加tox和Travis-CI

许可证

BSD 3-Clause License。请参阅LICENSE文件。

构建状态

Master

https://travis-ci.org/initios/factura-pdf.svg?branch=master

Develop

https://travis-ci.org/initios/factura-pdf.svg?branch=develop

项目详情


下载文件

下载适用于您的平台文件。如果您不确定要选择哪个,请了解有关安装软件包的更多信息。

源分布

facturapdf-0.0.4.tar.gz (6.8 kB 查看哈希)

上传时间:

构建分布

facturapdf-0.0.4-py2.py3-none-any.whl (10.6 kB 查看哈希值)

上传时间 Python 2 Python 3

由以下机构支持