reportlab:使用 platypus 添加背景图像
这与此帖子有点相关,
我正在尝试将图像放在背景上,并且我希望能够在其上写入文本。 使用canvas.drawImage有帮助,但这对我来说太低级了。
我的程序使用鸭嘴兽,但canvas.drawImage是不同库的一部分。 我已经能够使用 platypus.Image
插入图像,但不知道如何将其设为背景。
任何建议都会很好,
谢谢 D
this is a bit related to this post
I am trying to place an image on the background, and I want to be able to write text over it.
using canvas.drawImage
helps, but that's too low level approach for me.
My program uses platypus, but canvas.drawImage
is part of different library.
I've been able to insert images with platypus.Image
, but couldn't figure out how to make it as background.
Any advice would be great,
Thanks
D
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您在 Platypus 中创建页面模板时,您可以通过命名参数
onPage
传递函数。在该功能中,您可以放置所有基本页面格式(页眉、页脚、水印、背景图像)。这是一个例子:
When you create a page template in Platypus you have the ability to pass a function via the named argument
onPage
. In that function you can place all your basic page formatting (headers, footers, watermark, background image).Here's an example: