def drawFirstPage(canv, doc): """ This is the Title Page Template (Portrait Oriented) """ canv.saveState() #set Page Size frame, pagesize = doc.getFrame(doc.template_id) canv.setPageSize(pagesize) canv.setFont(base_fonts()["normal"], doc.fontSize) addPlugin(canv, doc, frame=frame, talkative=True) canv.restoreState()
def drawLaterPage(canv, doc): """ This is the Template of any following Portrait Oriented Page """ canv.saveState() #set Page Size frame, pagesize = doc.getFrame(doc.template_id) canv.setPageSize(pagesize) canv.setFont(base_fonts()["normal"], doc.fontSize) addPlugin(canv, doc, frame=frame) canv.restoreState()
def drawLaterSpecialPage(canv, doc): """ This is the Template of any later drawn Landscape Oriented Page """ canv.saveState() #set Page Size and #some variables frame, pagesize = doc.getFrame(doc.template_id) #print(pagesize[0],pagesize[1]) canv.setPageSize(pagesize) canv.setFont(base_fonts()["normal"], doc.fontSize) addPlugin(canv, doc, frame=frame) canv.restoreState()
def drawFirstPage(canv, doc): """ This is the Title Page Template (Portrait Oriented) """ canv.saveState() #set Page Size frame, pagesize = doc.getFrame('FirstP', orientation="Portrait") canv.setPageSize(pagesize) canv.setFont(_baseFontNames["normal"], doc.fontSize) doc.centerM = (frame._width - (frame._leftPadding + frame._rightPadding)) / 2 doc.leftM = frame._leftPadding doc.rightM = frame._width - frame._rightPadding doc.headM = (frame._height - frame._topPadding) + doc.topM doc.bottomM = frame._bottomPadding - doc.topM addPlugin(canv, doc, frame="First") canv.restoreState()
def drawLaterLPage(canv, doc): """ This is the Template of any later drawn Landscape Oriented Page """ canv.saveState() #set Page Size and #some variables frame, pagesize = doc.getFrame('LaterL', orientation="Landscape") canv.setPageSize(pagesize) canv.setFont(_baseFontNames["normal"], doc.fontSize) doc.centerM = (frame._width - (frame._leftPadding + frame._rightPadding)) / 2 doc.leftM = frame._leftPadding doc.rightM = frame._width - frame._rightPadding doc.headM = (frame._height - frame._topPadding) + doc.topM doc.bottomM = frame._bottomPadding - doc.topM addPlugin(canv, doc, frame="Later") canv.restoreState()