背景图像使用报告实验室? [英] background image using report lab?

查看:103
本文介绍了背景图像使用报告实验室?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用reportlab将背景图像添加到pdf页面?

how can i add background image to pdf pages using reportlab?

推荐答案

假设您安装了PIL(Python Imaging Library) ,你可以使用 canvas.drawImage 。要制作背景图片,只需在页面上的任何其他内容之前调用 drawImage ,然后首先绘制它:然后其他所有内容都将在其上绘制。

Assuming you have PIL (Python Imaging Library) installed, you can use canvas.drawImage. To make a background image, just call drawImage before anything else on the page and it will be drawn first: then everything else will draw on top of it.

您可以在 ReportLab手册

这篇关于背景图像使用报告实验室?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆