您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

Python- Reportlabs-在2个不同的页面中保存2个不同的图形?

Python- Reportlabs-在2个不同的页面中保存2个不同的图形?

制作画布并在其上渲染图形:

from reportlab.pdfgen import canvas
from reportlab.graphics import renderPDF

c = canvas.Canvas('hi.pdf')

# your drawing
# drawing = Drawing(400, 200)

x, y = 0, 0 # coordinates (from left bottom)
renderPDF.draw(drawing, c, x, y, showBoundary=False)

c.showPage() # to end a page and start a new one

# extra pages content

c.save() # to save :D the whole document

希望能帮助到你 :)

python 2022/1/1 18:50:43 有494人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶