制作画布并在其上渲染图形:
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
希望能帮助到你 :)