当前位置: 首页>>代码示例>>Python>>正文


Python Table.spaceAfter方法代码示例

本文整理汇总了Python中reportlab.platypus.Table.spaceAfter方法的典型用法代码示例。如果您正苦于以下问题:Python Table.spaceAfter方法的具体用法?Python Table.spaceAfter怎么用?Python Table.spaceAfter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在reportlab.platypus.Table的用法示例。


在下文中一共展示了Table.spaceAfter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __type_prestation_secondrow

# 需要导入模块: from reportlab.platypus import Table [as 别名]
# 或者: from reportlab.platypus.Table import spaceAfter [as 别名]
 def __type_prestation_secondrow(self):
     typePresta_data = [[ self.__autreTypePresta_checkbox(), Paragraph(u"Autre prestatation (à préciser):"+self.__prestaType_precisions(), self.paragraph_style)],]
     typePresta_style = TableStyle([self.fontsize_style,('VALIGN',(1,0),(1,0),'MIDDLE')])
     colWidths=[25, 500]
     typePresta_table = Table(data=typePresta_data, style=typePresta_style, colWidths=colWidths)
     typePresta_table.spaceAfter = 20
     typePresta_table.hAlign = 0
     self.elements.append(typePresta_table)
开发者ID:cazino,项目名称:Formation,代码行数:10,代码来源:base_evenement.py

示例2: __lc_abandon

# 需要导入模块: from reportlab.platypus import Table [as 别名]
# 或者: from reportlab.platypus.Table import spaceAfter [as 别名]
 def __lc_abandon(self, typeEvenement):
     abandonPresta_data = [[self.__abandon_checkbox(typeEvenement), u"A ABANDONNE EN COURS DE PRESTATION A LA DATE DU: " + self.__abandon_date(typeEvenement)],
                           [None, Paragraph(u"<strong>Indiquer le motif: </strong>" + self.__abandon_motif(typeEvenement), self.paragraph_style) ]
                       ]
     colWidths = [25, 500]
     abandonPresta_style = TableStyle([('FONTSIZE', (1,0), (1,0), self.grandePolice),
                                   ('VALIGN',(1,0),(1,0),'TOP'),
                                   ('FONTSIZE', (1,1), (1,1), self.basePolice),
                                   ])
     abandonPresta = Table(abandonPresta_data, style=abandonPresta_style, colWidths=colWidths)
     abandonPresta.hAlign = 0
     abandonPresta.spaceAfter = 20
     self.elements.append(abandonPresta)
开发者ID:cazino,项目名称:Formation,代码行数:15,代码来源:base_evenement.py

示例3: evenement_est

# 需要导入模块: from reportlab.platypus import Table [as 别名]
# 或者: from reportlab.platypus.Table import spaceAfter [as 别名]
def evenement_est(response, lettre_commande):
    # Our container for 'Flowable' objects
    elements = []

    # Main TableFontsize
    petitePolice = 10
    basePolice = 12
    grandePolice = 14

    fontsize_style = ("FONTSIZE", (0, 0), (-1, -1), basePolice)

    rootPath = "/var/www/vhosts/backupmix.com/httpdocs/greta/administration/pdf/img/"
    # Empty checkbox
    empty_checkbox = Image(rootPath + "checkbox_empty.jpg", width=18, height=18)

    # Checked checkbox
    checked_checkbox = Image(rootPath + "checkbox_checked.jpg", width=18, height=18)

    checks_box = (empty_checkbox, checked_checkbox)

    # A basic document for us to write to 'rl_hello_platypus.pdf'
    # doc = SimpleDocTemplate("fiche_evenemment.pdf", rightMargin=10, leftMargin=10, topMargin=0, bottomMargin=5)
    doc = SimpleDocTemplate(response, rightMargin=10, leftMargin=10, topMargin=0, bottomMargin=5)

    # Image en-tête
    evenementEst_Image = Image(rootPath + "evenement_est.jpg", width=573, height=159)
    evenementEst_Image.spaceAfter = 30
    elements.append(evenementEst_Image)

    # Create two 'Paragraph' Flowables and add them to our 'elements'
    # elements.append(Paragraph("The Platypus", styles['Heading1']))
    elements.append(Paragraph("<u>Type de prestation</u>", styles.getSampleStyleSheet()["Heading2"]))

    # Tableau type de prestations
    typePresta_data = [
        [
            empty_checkbox,
            "BCA",
            checked_checkbox,
            "CIBLE",
            empty_checkbox,
            "OP CREA",
            empty_checkbox,
            "ECCP",
            empty_checkbox,
            "MOB",
            empty_checkbox,
            "STR",
            empty_checkbox,
            "EPCE",
        ]
    ]
    colonnesWidths = (20, 55, 20, 65, 20, 80, 20, 55, 20, 55, 20, 50, 20, 50)
    typePresta_style = TableStyle(
        [
            fontsize_style,
            ("VALIGN", (1, 0), (1, 0), "MIDDLE"),
            ("VALIGN", (3, 0), (3, 0), "MIDDLE"),
            ("VALIGN", (5, 0), (5, 0), "MIDDLE"),
            ("VALIGN", (7, 0), (7, 0), "MIDDLE"),
            ("VALIGN", (9, 0), (9, 0), "MIDDLE"),
            ("VALIGN", (11, 0), (11, 0), "MIDDLE"),
            ("VALIGN", (13, 0), (13, 0), "MIDDLE"),
        ]
    )
    typePresta_style.spaceAfter = 10
    typePresta_table = Table(data=typePresta_data, colWidths=colonnesWidths, style=typePresta_style)
    elements.append(typePresta_table)

    location_style = styles.getSampleStyleSheet()["Normal"]
    location_style.spaceAfter = 10
    location_style.alignment = enums.TA_LEFT

    elements.append(
        Paragraph(
            u"<font size='12'><b>Nom du prestataire: </b>%s</font>" % (lettre_commande.site.prestataire.nom,),
            location_style,
        )
    )
    elements.append(
        Paragraph(
            u"<font size='12'><b>Lieu de réalisation: </b>%s</font>" % (lettre_commande.site.nom,), location_style
        )
    )
    elements.append(Paragraph(u"<font size='12'><b>Agence d'inscription: </b>%s</font>", location_style))

    tableData = [
        [
            u"Nom-Prénom du DE:",
            lettre_commande.nom + " " + lettre_commande.prenom,
            "",
            "",
            u"N° Identifiant:",
            lettre_commande.polemploi_id,
        ],
        [
            "Date du premier RDV:",
            lettre_commande.ouverture_rdv.dateheure.date().strftime("%d/%m/%Y"),
            "",
            "",
#.........这里部分代码省略.........
开发者ID:cazino,项目名称:Formation,代码行数:103,代码来源:evenement.py

示例4: aaa

# 需要导入模块: from reportlab.platypus import Table [as 别名]
# 或者: from reportlab.platypus.Table import spaceAfter [as 别名]
def aaa(response, lettre_commande, premierRdv):
    # Our container for 'Flowable' objects
    elements = []
    
    # Main TableFontsize
    petitePolice = 10
    basePolice  = 12
    grandePolice = 14
    
    
    fontsize_style = ('FONTSIZE',(0,0),(-1,-1),basePolice)
    
    rootPath = '/var/www/vhosts/backupmix.com/httpdocs/greta/administration/pdf/img/'
    #Empty checkbox
    empty_checkbox = Image(rootPath+"checkbox_empty.jpg", width=18, height=18)
    
    #Checked checkbox
    checked_checkbox = Image(rootPath+"checkbox_checked.jpg", width=18, height=18)
    
    
    # A basic document for us to write to 'rl_hello_platypus.pdf'
    #doc = SimpleDocTemplate("fiche_evenemment.pdf", rightMargin=10, leftMargin=10, topMargin=0, bottomMargin=5)
    doc = SimpleDocTemplate(response, rightMargin=10, leftMargin=10, topMargin=0, bottomMargin=5)
    
    
    #Image en-tête
    evenementEst_Image = Image(rootPath+"evenement_est.jpg", width=573, height=159)
    evenementEst_Image.spaceAfter = 30
    elements.append(evenementEst_Image)
    
    
    # Create two 'Paragraph' Flowables and add them to our 'elements'
    #elements.append(Paragraph("The Platypus", styles['Heading1']))
    elements.append(Paragraph("<u>Type de prestation</u>", styles.getSampleStyleSheet()['Heading2']))
    
    
    # Tableau type de prestations
    typePresta_data = [[empty_checkbox,'BCA',checked_checkbox,'CIBLE',empty_checkbox,'OP CREA',empty_checkbox,'ECCP',empty_checkbox,'MOB',empty_checkbox,'STR',empty_checkbox,'EPCE']]
    colonnesWidths =    (20,            55,    20,             65,       20,            80,     20,             55,     20,           55,      20,         50,    20,          50)                             
    typePresta_style = TableStyle([fontsize_style,
                                   ('VALIGN',(1,0),(1,0),'MIDDLE'),
                                   ('VALIGN',(3,0),(3,0),'MIDDLE'),
                                   ('VALIGN',(5,0),(5,0),'MIDDLE'),
                                   ('VALIGN',(7,0),(7,0),'MIDDLE'),
                                   ('VALIGN',(9,0),(9,0),'MIDDLE'),
                                   ('VALIGN',(11,0),(11,0),'MIDDLE'),
                                   ('VALIGN',(13,0),(13,0),'MIDDLE'),
                                   ])
    typePresta_style.spaceAfter = 10
    typePresta_table = Table(data=typePresta_data, colWidths=colonnesWidths, style=typePresta_style)
    elements.append(typePresta_table)
    
    
    
    location_style = styles.getSampleStyleSheet()['Normal']
    location_style.spaceAfter = 10
    location_style.alignment = enums.TA_LEFT
    elements.append(Paragraph("<font size='14'><b>Nom du prestataire: </b>prestataire x</font>", location_style))
    elements.append(Paragraph("<font size='14'><b>Lieu de réalisation: </b>lieu x</font>", location_style))
    elements.append(Paragraph("<font size='14'><b>Agence d'inscription: </b>agence x</font>", location_style))
    
    
    tableData = [["Nom-Prénom du DE:", "Gerar Lambert", "", "","N° Identifiant:" ,"21356"],
                 ["Date du premier RDV:", "jj/mm/aaaa", "", "","Heure du RDV:" ,"hh:mm"],
                 ]
    tableStyle = TableStyle([fontsize_style,
                             #('ALIGN', (0,0), (5,0), 'RIGHT'),
                             ('FONT', (0,0), (0,1), 'Times-Bold'),
                             ('FONT', (4,0), (4,1), 'Times-Bold'),
                             ('ALIGN', (0,0), (-1,-1), 'LEFT'),
                             
                             ])
    table = Table(tableData,style=tableStyle)
    table.hAlign = 0
    #table.leftPadding = 0
    table.spaceAfter = 20
    elements.append(table)
    
    
    # Escpace
    #space1 = Spacer(width=450, height=20)
    #elements.append(space1)
    
    # Barre Horizontale
    barreHorizontale = Image(rootPath+"barre_horizontale.jpg", width=520, height=6)
    barreHorizontale.spaceAfter = 20
    elements.append(barreHorizontale)
    
    
    # Tableaux Premier RDV
    
    # DEMARRAGE DE PRESTATION
    demarragePresta_data = [[empty_checkbox, "A DEMARRE LA PRESTATION"],]
    demarragePresta_style = TableStyle([('FONTSIZE', (1,0), (1,0), grandePolice),
                                        ('LEADING', (1,0), (1,0), 3),
                                       ('VALIGN',(1,0),(1,0),'TOP'),
                                       ])
    demarragePresta = Table(demarragePresta_data, style=demarragePresta_style)
    demarragePresta.hAlign = 0 
    demarragePresta.spaceAfter = 10
#.........这里部分代码省略.........
开发者ID:cazino,项目名称:Formation,代码行数:103,代码来源:testmanu.py


注:本文中的reportlab.platypus.Table.spaceAfter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。