【发布时间】:2012-06-21 13:25:22
【问题描述】:
我有一个单页 OpenOffice 文档,它是一个 POD 模板。基本上,我使用这个模板将模板中的标签替换为渲染文档中自动生成的数据。
这就是它的工作原理:
# loads the POD OpenOffice template engine
from appy.pod.renderer import Renderer as OORenderer
# defines data for template tags
ctx = {'template_tag': 'my_data'}
# renders the template in my_model.odt using defined data
r = OORenderer('my_model.odt', ctx, 'rendered_file.pdf')
# saves into the specified PDF file
r.run()
我想生成几个这样的页面,并将它们合并到一个 PDF 文件中。
有没有办法使用 POD 做到这一点?
或者我可以通过编程方式将生成的 PDF 文件合并到一个文件中吗?
谢谢!
【问题讨论】:
标签: python libreoffice