from reportlab.graphics.shapes import Drawing, String
from reportlab.graphics import renderPDF
d = Drawing(200, 200)
s = String(50, 50, 'victor is a good man', textAncher='middle')
d.add(s)
renderPDF.drawToFile(d, r'd:\victor.pdf', 'simple pdf')
from reportlab.graphics.shapes import Drawing, String
from reportlab.graphics import renderPDF
d = Drawing(200, 200)
s = String(50, 50, 'victor is a good man', textAncher='middle')
d.add(s)
renderPDF.drawToFile(d, r'd:\victor.pdf', 'simple pdf')
相关课程