def __init__(self, cover=None, id=None, onPage=_doNothing, onPageEnd=_doNothing, pagesize=(page_width, page_height)): id = 'TitlePage' frames = Frame(page_margin_left, page_margin_bottom, print_width, print_height) PageTemplate.__init__(self,id=id, frames=frames,onPage=onPage,onPageEnd=onPageEnd,pagesize=pagesize) self.cover = cover
def __init__(self, **kw): self.pisaStaticList = [] self.pisaBackgroundList = [] self.pisaBackground = None PageTemplate.__init__(self, **kw) self._page_count = 0 self._first_flow = True
def __init__(self, pageSize=A3): id = 'simplepage' #frames = Frame(0, 0, pageSize[0], pageSize[1]) pw = pageSize[0] ph = pageSize[1] frames = Frame(page_margin_left, page_margin_bottom, pw-page_margin_left-page_margin_right, ph-page_margin_top-page_margin_bottom) PageTemplate.__init__(self, id=id, frames=frames, pagesize=pageSize)
def __init__(self): #allow a bigger margin on the right for the staples frame = Frame(3.5*cm, 2.5*cm, 16*cm, 25*cm, id='F1') PageTemplate.__init__(self, id='right', frames=[frame], pagesize=A4)
def __init__(self,title=None, id=None, onPage=_doNothing, onPageEnd=_doNothing, pagesize=(page_width, page_height)): """ @type title: unicode """ id = title.encode('utf-8') frames = Frame(page_margin_left,page_margin_bottom, print_width, print_height) PageTemplate.__init__(self,id=id, frames=frames,onPage=onPage,onPageEnd=onPageEnd,pagesize=pagesize) self.title = title
def __init__(self, id=-1, pageSize=TAILLE_PAGE, doc=None): self.pageWidth = pageSize[0] self.pageHeight = pageSize[1] # Récupère les coordonnées du cadre principal cadre_principal = doc.modeleDoc.FindObjet("cadre_principal") x, y, l, h = doc.modeleDoc.GetCoordsObjet(cadre_principal) global CADRE_CONTENU CADRE_CONTENU = (x, y, l, h) frame1 = Frame(x, y, l, h, id='F1', leftPadding=0, topPadding=0, rightPadding=0, bottomPadding=0) PageTemplate.__init__(self, id, [frame1], Template)
def __init__(self, cover=None, id=None, onPage=_doNothing, onPageEnd=_doNothing, pagesize=(page_width, page_height)): id = 'TitlePage' p = pdfstyles frames = Frame(p.title_margin_left, p.title_margin_bottom, p.page_width-p.title_margin_left-p.title_margin_right, p.page_height-p.title_margin_top-p.title_margin_bottom) PageTemplate.__init__(self,id=id, frames=frames,onPage=onPage,onPageEnd=onPageEnd,pagesize=pagesize) self.cover = cover
def __init__(self, **kw): self.pisaStaticList = [] self.pisaBackgroundList = [] self.pisaBackground = None PageTemplate.__init__(self, **kw) self._page_count = 0 self._first_flow = True ### Background Image ### self.img = None self.ph = 0 self.h = 0 self.w = 0
def __init__(self, **kw): self.pisaStaticList = [] self.pisaBackgroundList = [] self.pisaBackground = None PageTemplate.__init__(self, **kw) self._page_count = 0 self._first_flow = True ### Background Image ### self.img = None self.ph = 0 self.h = 0 self.w = 0
def __init__(self, cover=None, id=None, onPage=_doNothing, onPageEnd=_doNothing, pagesize=(page_width, page_height)): id = 'TitlePage' frames = Frame(page_margin_left, page_margin_bottom, print_width, print_height) PageTemplate.__init__(self, id=id, frames=frames, onPage=onPage, onPageEnd=onPageEnd, pagesize=pagesize) self.cover = cover
def __init__(self, id=-1, pageSize=None, rect=None): self.pageWidth = pageSize[0] self.pageHeight = pageSize[1] self.hauteurColonne = 700 self.margeBord = 40 self.margeInter = 20 x, y, l, h = (self.margeBord, self.margeBord, LARGEUR_COLONNE, self.hauteurColonne) frame1 = Frame(x, y, l, h, id='F1', leftPadding=0, topPadding=0, rightPadding=0, bottomPadding=0) x, y, l, h = (self.margeBord + LARGEUR_COLONNE + self.margeInter, self.margeBord, LARGEUR_COLONNE, self.hauteurColonne) frame2 = Frame(x, y, l, h, id='F2', leftPadding=0, topPadding=0, rightPadding=0, bottomPadding=0) x, y, l, h = (self.margeBord + (LARGEUR_COLONNE + self.margeInter) * 2, self.margeBord, LARGEUR_COLONNE, self.hauteurColonne) frame3 = Frame(x, y, l, h, id='F2', leftPadding=0, topPadding=0, rightPadding=0, bottomPadding=0) PageTemplate.__init__(self, id, [frame1, frame2, frame3], Template)
def __init__(self, id=-1, pageSize=None, rect=None): self.pageWidth = pageSize[0] self.pageHeight = pageSize[1] self.hauteurColonne = 700 self.margeBord = 40 self.margeInter = 20 x, y, l, h = (self.margeBord, self.margeBord, LARGEUR_COLONNE, self.hauteurColonne) frame1 = Frame(x, y, l, h, id='F1', leftPadding=0, topPadding=0, rightPadding=0, bottomPadding=0) x, y, l, h = (self.margeBord+LARGEUR_COLONNE+self.margeInter, self.margeBord, LARGEUR_COLONNE, self.hauteurColonne) frame2 = Frame(x, y, l, h, id='F2', leftPadding=0, topPadding=0, rightPadding=0, bottomPadding=0) x, y, l, h = (self.margeBord+(LARGEUR_COLONNE+self.margeInter)*2, self.margeBord, LARGEUR_COLONNE, self.hauteurColonne) frame3 = Frame(x, y, l, h, id='F2', leftPadding=0, topPadding=0, rightPadding=0, bottomPadding=0) PageTemplate.__init__(self, id, [frame1, frame2, frame3], Template)
def __init__(self, id=-1, pageSize=TAILLE_PAGE, doc=None): self.pageWidth = pageSize[0] self.pageHeight = pageSize[1] # Récupère les coordonnées du cadre principal cadre_principal = doc.modeleDoc.FindObjet("cadre_principal") x, y, l, h = doc.modeleDoc.GetCoordsObjet(cadre_principal) global CADRE_CONTENU CADRE_CONTENU = (x, y, l, h) frame1 = Frame(x, y, l, h, id='F1', leftPadding=0, topPadding=0, rightPadding=0, bottomPadding=0) PageTemplate.__init__(self, id, [frame1], Template)
def __init__(self, cover=None, id=None, onPage=_doNothing, onPageEnd=_doNothing, pagesize=(page_width, page_height)): id = 'TitlePage' p = pdfstyles frames = Frame( p.title_margin_left, p.title_margin_bottom, p.page_width - p.title_margin_left - p.title_margin_right, p.page_height - p.title_margin_top - p.title_margin_bottom) PageTemplate.__init__(self, id=id, frames=frames, onPage=onPage, onPageEnd=onPageEnd, pagesize=pagesize) self.cover = cover
def __init__(self, id, pagesize, stickysize, cols, rows, show_boundary): margin_h = (pagesize[0] - stickysize[0] * cols) / (cols + 1) margin_v = (pagesize[1] - stickysize[1] * rows) / (rows + 1) if show_boundary: boundary = ShowBoundaryValue((0, 0, 0), 0.3) else: boundary = ShowBoundaryValue((0.75, 0.75, 0.75), 0.05) frames = [] for ridx in xrange(rows): for cidx in xrange(cols): frame_type = Frame( x1=cidx * (margin_h + stickysize[0]) + margin_h, y1=pagesize[1] - (ridx + 1) * (margin_v + stickysize[1]), width=stickysize[0], height=stickysize[1], leftPadding=12, bottomPadding=12, rightPadding=8, topPadding=8, showBoundary=0, ) frame_main = Frame( x1=cidx * (margin_h + stickysize[0]) + margin_h, y1=pagesize[1] - (ridx + 1) * (margin_v + stickysize[1]), width=stickysize[0], height=stickysize[1], leftPadding=12, bottomPadding=12, rightPadding=16, topPadding=8, showBoundary=boundary, ) frames.append(frame_type) frames.append(frame_main) PageTemplate.__init__(self, id=id, frames=frames, pagesize=pagesize)
def __init__(self, document, pagesbookmarks={}, author=None, title=None, subject=None, margins = (0,0,0,0), # additional margins in mm (left,top,right, bottom) server_name = '', footer_template = DEFAULT_PDF_FOOTER_TEMPLATE, filigranne=None, preferences=None # dictionnary with preferences, required ): """Initialise our page template.""" self.preferences = preferences self.pagesbookmarks = pagesbookmarks self.pdfmeta_author = author self.pdfmeta_title = title self.pdfmeta_subject = subject self.server_name = server_name self.filigranne = filigranne self.footer_template = footer_template # Our doc is made of a single frame left, top, right, bottom = [ float(x) for x in margins ] content = Frame(10.*mm + left*mm, 13.*mm + bottom*mm, document.pagesize[0] - 20.*mm - left*mm - right*mm, document.pagesize[1] - 18.*mm - top*mm - bottom*mm) PageTemplate.__init__(self, "ScolarsPageTemplate", [content]) self.logo = None
def __init__(self): # allow a bigger margin on the right for the staples frame = Frame(1.5 * cm, 2.5 * cm, 16 * cm, 25 * cm, id="F1") PageTemplate.__init__(self, id="left", frames=[frame], pagesize=A4)
def __init__(self, **kw): self.pisaStaticList = [] self.pisaBackgroundList = [] self.pisaBackground = None PageTemplate.__init__(self, **kw)
def __init__(self, **args): BasePageTemplate.__init__(self, **args) self.directives = []
def __init__(self, name=None, rcptaddr=[], senderaddr=[], kind='purchase', phone=None, email=None, url=None, seat=None, orgnum=None, vatnum=None, fskatt=None, date=None, ocr='', expiryDate=None, conditions=None, latefee=None, buyerref='', annotation='', pgnum=None, total=0, qrcode=None, styles={}, showBoundary=0, frames=[]): self.kind = kind self.date = date or time.time() self.ocr = ocr self.expiryDate = expiryDate self.conditions = conditions self.latefee = latefee self.buyerref = buyerref self.annotation = annotation self.pgnum = pgnum self.total = total self.qrcode = qrcode self.showBoundary = showBoundary self.styles = styles self.smallstyle = smallstyle = ParagraphStyle('Small', fontName='Helvetica', fontSize=8, leading=9) self.detailsFooterFrame = Frame(75 * mm, 12 * mm, 55 * mm, 20 * mm, id='phonefooter', leftPadding=0, bottomPadding=0, rightPadding=0, topPadding=0, showBoundary=showBoundary) self.detailstext = s = [] if phone: s.append(Paragraph(_(u'Phone: %s') % py3txt(phone), smallstyle)) if email: s.append(Paragraph(_(u'Email: %s') % py3txt(email), smallstyle)) if url: s.append(Paragraph(_(u'Web: %s') % py3txt(url), smallstyle)) if seat: s.append( Paragraph( _(u'Registered office: %s') % py3txt(seat), smallstyle)) self.bankFooterFrame = Frame(140 * mm, 12 * mm, 55 * mm, 20 * mm, id='bankfooter', leftPadding=0, bottomPadding=0, rightPadding=0, topPadding=0, showBoundary=showBoundary) self.banktext = s = [] if pgnum: s.append( Paragraph( _('Pg: %s') % py3txt(formatters.pgnum(pgnum)), smallstyle)) s.append(Paragraph(_('Org no: %s') % py3txt(orgnum), smallstyle)) if vatnum: s.append(Paragraph(_('VAT no: %s') % py3txt(vatnum), smallstyle)) if fskatt: s.append(Paragraph('Innehar F-skattsedel', smallstyle)) PageTemplate.__init__(self, name, frames)
def __init__(self, **kw): self.pisaStaticList = [] self.pisaBackgroundList = [] self.pisaBackground = None PageTemplate.__init__(self, **kw)
def __init__(self): #allow a bigger margin on the right for the staples frame = Frame(3.5 * cm, 2.5 * cm, 16 * cm, 25 * cm, id='F1') PageTemplate.__init__(self, id='right', frames=[frame], pagesize=A4)