def framePage(canvas, title): global closeit titlelist.append(title) # canvas._inPage0() # do we need this at all? would be good to eliminate it canvas.saveState() canvas.setFont("Times-BoldItalic", 20) canvas.drawString(inch, 10.5 * inch, title) canvas.bookmarkHorizontalAbsolute(title, 10.8 * inch) # newsection(title) canvas.addOutlineEntry(title + " section", title, level=0, closed=closeit) closeit = not closeit # close every other one canvas.setFont("Times-Roman", 10) canvas.drawCentredString(4.135 * inch, 0.75 * inch, "Page %d" % canvas.getPageNumber()) canvas.restoreState() canvas.doForm("frame")
def framePage(canvas, title): global closeit titlelist.append(title) #canvas._inPage0() # do we need this at all? would be good to eliminate it canvas.saveState() canvas.setFont('Times-BoldItalic', 20) canvas.drawString(inch, 10.5 * inch, title) canvas.bookmarkHorizontalAbsolute(title, 10.8 * inch) #newsection(title) canvas.addOutlineEntry(title + " section", title, level=0, closed=closeit) closeit = not closeit # close every other one canvas.setFont('Times-Roman', 10) canvas.drawCentredString(4.135 * inch, 0.75 * inch, 'Page %d' % canvas.getPageNumber()) canvas.restoreState() canvas.doForm("frame")
def makesubsection(canvas, title, horizontal): canvas.bookmarkHorizontalAbsolute(title, horizontal) # newsubsection(title) canvas.addOutlineEntry(title + " subsection", title, level=1)
def makesubsection(canvas, title, horizontal): canvas.bookmarkHorizontalAbsolute(title, horizontal) #newsubsection(title) canvas.addOutlineEntry(title + " subsection", title, level=1)