根据西班牙法规创建PDF发票。
项目描述
根据西班牙法规创建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 |
|
Develop |
项目详情
下载文件
下载适用于您的平台文件。如果您不确定要选择哪个,请了解有关安装软件包的更多信息。
源分布
facturapdf-0.0.4.tar.gz (6.8 kB 查看哈希)
构建分布
facturapdf-0.0.4-py2.py3-none-any.whl (10.6 kB 查看哈希值)
关闭
facturapdf-0.0.4.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 8782f3612ffa9e702159ed8f5152fef17b1c95b79f0f86a90a4492d262f97928 |
|
MD5 | d241e4d1213ae17a318dfbcd3c68e7bb |
|
BLAKE2b-256 | 2daadf059278970aa6f6503afee9219e05798c1367bc877f3da0cafe9f8d757f |
关闭
facturapdf-0.0.4-py2.py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 9b0c1e60f6c3d24e151b2ea0b1e65860a768391a3e25f945ede6368817b8a5af |
|
MD5 | 2b200a96d24f9cb87c271cc32816bc4d |
|
BLAKE2b-256 | 1696c68c2d52a6f42a48bfa11147a6cd087c199ea3941f02291ece9e33fd0f07 |