Ignore:
Timestamp:
22 Feb 2013, 17:31:08 (12 years ago)
Author:
Henrik Bettermann
Message:

If left logo is used, then center title.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py

    r9976 r9980  
    535535    watermark_path = None
    536536    header_logo_path = None
    537     header_logo2_path = None
     537    header_logo_left_path = None
    538538    watermark_pos = [0, 0]
    539539    logo_pos = [0, 0, 0]
    540     logo2_pos = [0, 0, 0]
     540    logo_left_pos = [0, 0, 0]
    541541
    542542    @classmethod
     
    726726                u'Sample University'))
    727727        canvas.setFont("Helvetica-Bold", 18)
    728         canvas.drawString(1.5*cm, height-1.7*cm, head_title)
     728        if self.header_logo_left_path is not None:
     729            canvas.drawCentredString(width/2.0, height-1.7*cm, head_title)
     730        else:
     731            canvas.drawString(1.5*cm, height-1.7*cm, head_title)
    729732        canvas.line(1.5*cm,height-1.9*cm,width-1.5*cm,height-1.9*cm)
    730733        if self.header_logo_path is not None:
     
    732735                self.logo_pos[0], self.logo_pos[1], width=self.logo_pos[2],
    733736                preserveAspectRatio=True, anchor='ne')
    734         if self.header_logo2_path is not None:
    735             canvas.drawImage(self.header_logo2_path,
    736                 self.logo2_pos[0], self.logo2_pos[1], width=self.logo2_pos[2],
     737        if self.header_logo_left_path is not None:
     738            canvas.drawImage(self.header_logo_left_path,
     739                self.logo_left_pos[0], self.logo_left_pos[1],
     740                width=self.logo_left_pos[2],
    737741                preserveAspectRatio=True, anchor='ne')
    738742
Note: See TracChangeset for help on using the changeset viewer.