Reportlab 图形和项目符号
我正在尝试找出一个好方法来做到这一点。我看到有一种方法可以在reportlab中做项目符号列表,唯一的问题是这假设项目符号将是某种文本字符(如“*”或“-”)。我想弄清楚的是,在可流动框架中使用图像作为项目符号的最佳方式是什么?任何关于如何最好地解决这个问题的见解都将受到赞赏。
谢谢,
RB
I am trying to figure out a good way to do this. I see that there is a way to do bulleted lists in reportlab, the only problem is that this assumes that the bullets will be some sort of text character (like a "*" or "-"). What I am trying to figure out is what is the best way to use an image as the bullet in a flowable frame? Any insight on how best to go about this would be appreciatded.
Thanks,
RB
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我对项目符号完成方式的了解,您可能最好开发一个自定义的 Flowable,它复制项目符号列表功能,但允许您选择项目符号作为图像。诚然,这不是一个很好的解决方案,但它可以完成工作。项目符号的实现方式在很大程度上取决于文本布局,并且并不真正具备用图像替换项目符号字符的能力。
至少据我了解 ReportLab 内部结构是这样。
Based on what I know of the way bullets are done, you'd probably be best off developing a custom flowable that replicates bullet list functionality but lets you choose the bullet to be an image. Admittedly, not a great solution, but it would get the job done. The way bullets are implemented depends somewhat heavily on text layout and isn't really equipped to replace the bullet character with an image.
At least that's as far as I understand ReportLab internals.