Changeset 15889 for main


Ignore:
Timestamp:
12 Dec 2019, 18:38:41 (5 years ago)
Author:
Henrik Bettermann
Message:

Make topMargin customizable.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
3 edited

Legend:

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

    r15880 r15889  
    824824        pdf_stream = StringIO()
    825825        bottomMargin = len(sigs_in_footer) and 1.9*inch or 1.2*inch
    826         if letterhead_path:
    827             topMargin += 1.2
    828         else:
     826        if not letterhead_path:
    829827            topMargin += title.count('\n') * 0.2
    830828        doc = SimpleDocTemplate(
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r15880 r15889  
    146146    def renderPDFAdmissionLetter(view, student=None, omit_fields=(),
    147147                                 pre_text=None, post_text=None,
     148                                 topMargin = None,
    148149                                 letterhead_path=None):
    149150        """Render pdf admission letter.
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r15888 r15889  
    860860    def renderPDFAdmissionLetter(self, view, student=None, omit_fields=(),
    861861                                 pre_text=None, post_text=None,
     862                                 topMargin = 1.5,
    862863                                 letterhead_path=None):
    863864        """Render pdf admission letter.
     
    916917        pdf_stream = creator.create_pdf(
    917918            data, None, doc_title, author=author, footer=footer_text,
    918             note=post_text, letterhead_path=letterhead_path)
     919            note=post_text, topMargin=topMargin,
     920            letterhead_path=letterhead_path)
    919921        return pdf_stream
    920922
Note: See TracChangeset for help on using the changeset viewer.