def _unpaid_list_header(canvas, doc, event):
canvas.saveState()
canvas.drawImage(LOGO_PATH, 0.45 * inch, PAGE_HEIGHT - inch * 0.75,
height=0.5 * inch, width=1.875*inch)
canvas.setLineWidth(2)
canvas.line(0.45 * inch, PAGE_HEIGHT - inch * 0.8,
PAGE_WIDTH - 0.45 * inch, PAGE_HEIGHT - inch * 0.8)
canvas.setLineWidth(1)
canvas.line(0.45 * inch, PAGE_HEIGHT - inch * 0.84,
PAGE_WIDTH - 0.45 * inch, PAGE_HEIGHT - inch * 0.84)
canvas.setFont('Helvetica-Bold', 18)
canvas.drawCentredString(PAGE_WIDTH/2, PAGE_HEIGHT - inch * 1.15,
'UNPAID DELEGATE LIST')
canvas.line(PAGE_WIDTH / 2 - inch * 1.5, PAGE_HEIGHT - inch * 1.18,
PAGE_WIDTH / 2 + inch * 1.5, PAGE_HEIGHT - inch * 1.18)
style = ParagraphStyle(
name='textStyle',
fontName='Helvetica',
fontSize=11,
leading=13,
alignment=TA_LEFT,
)
boilerplate = Paragraph(
'The undersigned acknowledges having attended "<b>' + \
event.title + \
'</b>" that ran beginning on ' + \
event.date_begins.strftime('%-d %B, %Y') + \
', and has received all materials and related benefits of ' \
'said conference.',
style
)
h = boilerplate.wrap(doc.width, inch * 1.5)[1]
boilerplate.drawOn(canvas, doc.leftMargin, PAGE_HEIGHT - inch * 1.25 - h)
canvas.restoreState()
评论列表
文章目录