制作画布并在其上渲染图形:
from reportlab.pdfgen import canvasfrom reportlab.graphics import renderPDFc = 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 contentc.save() # to save :D the whole document希望能帮助到你 :)



