Using variable images with django-webodt

佐手、 提交于 2019-11-30 16:04:24

I don't know if it is a solution for you, I use pod in my projects with nice results, I have never tested to include images but it is documented:

Quoting pod doc:

Integrating external files or images into the result: the document function

The document function allows you to integrate, into the ODT result, images or files that come from external sources. Here is the function signature; the table below explains each parameter.

EDITED DUE OP COMMENT

I come to test it and work pretty well, also into loops. Here you can see python (or django) rendering document with images:

>>> from appy.pod.renderer import Renderer
>>> taula1 = [1,2,3]
>>> taula = [ taula1, taula1 ]
>>> renderer = Renderer('report.odt',  globals(), 'result.odt')
>>> renderer.run()

ODT:

Result:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!