title: reportlab different next page
body: <p>I am trying to produce a PDF document with different odd/even page layouts (to allow asymmetric borders for binding) using Python 2.7 and ReportLab. To further complicate matters I am trying to produce two-columns per page. </p>
  
  <pre><code>def WritePDF(files):
  
      story = []
      doc = BaseDocTemplate("Polar.pdf", pagesize=A4, title = "Polar Document 5th Edition")
  
      oddf1  = Frame(doc.leftMargin, doc.bottomMargin, doc.width/2-6, doc.height, id='oddcol1') 
      oddf2  = Frame(doc.leftMargin+doc.width/2+6, doc.bottomMargin, doc.width/2-6, doc.height, id='oddcol2')
      evenf1 = Frame(doc.leftMargin, doc.bottomMargin, doc.width/2-6, doc.height, id='evencol1') 
      evenf2 = Frame(doc.leftMargin+doc.width/2+6, doc.bottomMargin, doc.width/2-6, doc.height, id='evencol2')
      doc.addPageTemplates([PageTemplate(id='EvenTwoC',frames=[evenf1,evenf2],onPage=evenFooter),
                            PageTemplate(id='OddTwoC', frames=[oddf1, oddf2], onPage=oddFooter)])
  
  
      ...
  
      story.append(Paragraph(whatever, style))
  </code></pre>
  
  <p>What I can't figure out is how to make ReportLab alternate between right and left (or odd and even) pages. Any suggestions?</p>