title: How to combine two charts into the single PDF using ReportLab?
body: <p>Question : I'm generating charts using ReportLab. Charts are generated properly but into different PDF. I want to combine them into a single existing pdf. </p>
  
  <p>basic structure of code is</p>
  
  <pre><code>class BreakdownPieDrawing():
  
      def firstChart():
          #code for generating first Pie chart
  
      def secondChart():
          #code for generating second Pie chart
  
  if __name__=="__main__":   
      drawing1 = BreakdownPieDrawing()  
      drawing1.firstChart()
      drawing1.save(formats=['pdf'],outDir='.',fnRoot='first')
  
      drawing2 = BreakdownPieDrawing()  
      drawing2.secondChart()
      drawing2.save(formats=['pdf'],outDir='.',fnRoot='second')
  </code></pre>
  
  <p>for full code Snippets please refer <a href="http://www.reportlab.com/snippets/4/" rel="nofollow">http://www.reportlab.com/snippets/4/</a></p>
  
  <p>This code produces two separate PDFs. How can i combine them into single PDF. </p>
  
  <p>I tried this to code :</p>
  
  <pre><code>def makePdf(self,drawing):  
      doc = SimpleDocTemplate('hello.pdf')
      doc.build(drawing)
  </code></pre>
  
  <p>and then after I'm passing "BreakdownPieDrawing" class's object into this method. But this approach is not working.<br>
  I'm new to reportLab and python so pardon me for such a ugly code.</p>
  
  <p>So the question is how to add this charts into existing pdf. Any help would be greatly appreciated.  </p>