title: Two different pages with reportlab SimpleDocTemplate and Django
body: <p>I'm using django and generating reports following <a href="http://eric.sau.pe/reportlab-and-django-part-3-paragraphs-and-tables/">this example</a>, I need to generate a last page but without headers or footers and different content.</p>
  
  <p>I'm trying to do this:</p>
  
  <pre><code>def print_example(self):
      buffer = self.buffer
      doc = SimpleDocTemplate(buffer,
                              rightMargin=72,
                              leftMargin=72,
                              topMargin=72,
                              bottomMargin=72,
                              pagesize=self.pagesize)
  
      elements = []
      elements.append(Paragraph('Content for all pages'), my_custom_style)
      # ...
  
      doc.build(elements, onFirstPage=self._header_footer, onLaterPages=self._header_footer,
                    canvasmaker=NumberedCanvas)
  
      doc2 = SimpleDocTemplate(buffer,
                          rightMargin=72,
                          leftMargin=72,
                          topMargin=72,
                          bottomMargin=72,
                          pagesize=self.pagesize)
  
      elements2 = []
      elements2.append(Paragraph('Content for the last page only'), my_custom_style)
  
      doc2.build(elements2, canvasmaker=NumberedCanvas)
  
  
      # Get the value of the BytesIO buffer and write it to the response.
      pdf = buffer.getvalue()
      buffer.close()
      return pdf
  </code></pre>
  
  <p>Then only the last content appears and previous content dissapears.</p>
  
  <p>How can I generate the last page with different content?</p>