本文整理汇总了Python中gluon.contrib.pyfpdf.FPDF.multi_cell方法的典型用法代码示例。如果您正苦于以下问题:Python FPDF.multi_cell方法的具体用法?Python FPDF.multi_cell怎么用?Python FPDF.multi_cell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gluon.contrib.pyfpdf.FPDF
的用法示例。
在下文中一共展示了FPDF.multi_cell方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_me_a_pyfpdf
# 需要导入模块: from gluon.contrib.pyfpdf import FPDF [as 别名]
# 或者: from gluon.contrib.pyfpdf.FPDF import multi_cell [as 别名]
def get_me_a_pyfpdf():
title = "This The Doc Title"
heading = "First Paragraph"
text = 'bla '* 10000
pdf=FPDF()
pdf.add_page()
pdf.set_font('Times','B',15)
pdf.cell(w=210,h=9,txt=title,border=0,ln=1,align='C',fill=0)
pdf.set_font('Times','B',15)
pdf.cell(w=0,h=6,txt=heading,border=0,ln=1,align='L',fill=0)
pdf.set_font('Times','',12)
pdf.multi_cell(w=0,h=5,txt=text)
response.headers['Content-Type']='application/pdf'
return pdf.output(dest='S')
示例2: get_me_a_pyfpdf
# 需要导入模块: from gluon.contrib.pyfpdf import FPDF [as 别名]
# 或者: from gluon.contrib.pyfpdf.FPDF import multi_cell [as 别名]
def get_me_a_pyfpdf():
title = "This The Doc Title"
heading = "First Paragraph"
text = "bla " * 10000
pdf = FPDF()
pdf.add_page()
pdf.set_font("Times", "B", 15)
pdf.cell(w=210, h=9, txt=title, border=0, ln=1, align="C", fill=0)
pdf.set_font("Times", "B", 15)
pdf.cell(w=0, h=6, txt=heading, border=0, ln=1, align="L", fill=0)
pdf.set_font("Times", "", 12)
pdf.multi_cell(w=0, h=5, txt=text)
response.headers["Content-Type"] = "application/pdf"
return pdf.output(dest="S")
示例3: report
# 需要导入模块: from gluon.contrib.pyfpdf import FPDF [as 别名]
# 或者: from gluon.contrib.pyfpdf.FPDF import multi_cell [as 别名]
def report():
id = request.args(0) or redirect(URL('index'))
title = "Books"
heading = "First Paragraph"
text = 'xpto ' * 100
pdf = FPDF()
pdf.add_page()
pdf.set_font('Times','B',15)
pdf.cell(w=210,h=9,txt=title,border=0,ln=1,align='C',fill=0)
pdf.set_font('Times','B',15)
pdf.cell(w=0,h=6,txt=heading,border=0,ln=1,align='L',fill=0)
pdf.set_font('Times','',12)
pdf.multi_cell(w=0,h=5,txt=text)
response.headers['Content-Type']='application/pdf'
return pdf.output(name='report.pdf',dest='S')
示例4: report
# 需要导入模块: from gluon.contrib.pyfpdf import FPDF [as 别名]
# 或者: from gluon.contrib.pyfpdf.FPDF import multi_cell [as 别名]
def report():
id = request.args(0) or redirect(URL("index"))
title = "Erwin"
heading = "First Paragraph"
text = "xpto " * 100
pdf = FPDF()
pdf.add_page()
pdf.set_font("Times", "B", 15)
pdf.cell(w=210, h=9, txt=title, border=0, ln=1, align="C", fill=0)
pdf.set_font("Times", "B", 15)
pdf.cell(w=0, h=6, txt=heading, border=0, ln=1, align="L", fill=0)
pdf.set_font("Times", "", 12)
pdf.multi_cell(w=0, h=5, txt=text)
response.headers["Content-Type"] = "application/pdf"
return pdf.output(name="report.pdf", dest="S")