def draw_letter(self):
max_width = u('6.5in')
max_height = self.height - (
self.frame.top + self.frame.bottom)
self.set_cursor(u('1in'), self.height - self.frame.top)
dx, dy = self.draw_paragraph(
self.nice_date, max_width, max_height, BODY_STYLE)
self.move_cursor(0, -(dy + self.field_bottom_margin))
dx, dy = self.draw_paragraph(
"To Whom It May Concern,", max_width, max_height, BODY_STYLE)
self.move_cursor(0, -(dy + self.field_bottom_margin))
for field in self.keys_to_fields(self.letter_display_fields, 'letter'):
dx, dy = self.draw_paragraph(
field.get_display_value(), max_width, max_height, BODY_STYLE)
self.move_cursor(0, -(dy + self.field_bottom_margin))
dx, dy = self.draw_paragraph(
"Sincerely,", max_width, max_height, BODY_STYLE)
self.move_cursor(0, -(dy + self.field_bottom_margin))
full_name = " ".join([
self.form.first_name.get_display_value(),
self.form.last_name.get_display_value()
])
dx, dy = self.draw_paragraph(
full_name, max_width, max_height, BODY_STYLE)
评论列表
文章目录