2023年7月25日发(作者:)
python把竖着的变成横着的数_在pythonReportLab中,如何从横向布局更改为。。。我有⼀个新的问题(应该很容易回答)在过去的⼀天左右⼀直困扰着我,在所有与reportlab相关的在线帖⼦上都找不到答案。我只想在同⼀个⽂档中从横向切换到纵向。这将允许我创建⼀个功能表(包括指向表中这些功能的图⽚的链接),然后放⼊图⽚中,以便将它们链接到。以下是我到⽬前为⽌提出的代码,旨在促进应该是⼀个直截了当的过程:from import TA_LEFT, TA_RIGHT,TA_CENTER, TA_JUSTIFYfrom import colorsfrom zes import letter, landscapefrom us import SimpleDocTemplate, Paragraph, Spacer, Image, Frame,Table, TableStyle, NextPageTemplate, PageTemplate, BaseDocTemplatefrom import getSampleStyleSheet, ParagraphStylefrom import inchfrom les import Flowable, PageBreakfrom pyPdf import PdfFileReader, PdfFileWriterimport glob, osfrom zes import letter, A4doc = BaseDocTemplate("M:GIS Mapping ServicesPromotionalAutomatedReportsPDF_",showBoundary=1,pagesize=landscape(letter))elements = []styles = getSampleStyleSheet()(ParagraphStyle(name='normal', fontSize=6, leading = 7, alignment=TA_LEFT))ptemplate = PageTemplate(id='portrait', pagesize=portrait(letter))(Paragraph("Table is here.",styles["normal"]))(NextPageTemplate('portrait'))(PageBreak())(Paragraph("Pictures are to be placed here.",styles["normal"]))(elements)del elements如果你有任何提⽰或想帮助我解决这个问题,你可以具体地告诉我,我到底做错了什么,或包括⼀个⼯作的例⼦,从头到尾没有任何编码丢失。提前感谢你的帮助温
发布者:admin,转转请注明出处:http://www.yc00.com/news/1690214820a315961.html
评论列表(0条)