'Draws the title, order/receipt ID and the date.'

def draw_title(self, y_pos):

    if self.is_invoice:
        title = _('Invoice')
        id_label = _('Invoice')
    else:
        title = _('Receipt')
        id_label = _('Order')
    vertical_padding = (5 * mm)
    horizontal_padding_from_border = (self.margin + (9 * mm))
    font_size = 21
    self.pdf.setFontSize(font_size)
    self.pdf.drawString(horizontal_padding_from_border, ((y_pos - vertical_padding) - (font_size / 2)), title)
    y_pos = (((y_pos - vertical_padding) - (font_size / 2)) - self.min_clearance)
    horizontal_padding_from_border = (self.margin + (11 * mm))
    font_size = 12
    self.pdf.setFontSize(font_size)
    y_pos = ((y_pos - (font_size / 2)) - vertical_padding)
    self.pdf.drawString(horizontal_padding_from_border, y_pos, _(u'{id_label}    #    {item_id}').format(id_label=id_label, item_id=self.item_id))
    y_pos = ((y_pos - (font_size / 2)) - vertical_padding)
    self.pdf.drawString(horizontal_padding_from_border, y_pos, _(u'Date:    {date}').format(date=self.date))
    return (y_pos - self.min_clearance)
