title: How to export complete d3 tree graph as png or pdf
body: <p>I have a Zoom-able, dragable, tree graph which has thousands of nodes using inside my angular application.</p>
  
  <p><a href="http://bl.ocks.org/robschmuecker/7880033" rel="nofollow noreferrer">Design referenced from here</a>.</p>
  
  <p>I can download/export SVG or any parent div of SVG from my d3 graph.</p>
  
  <p>The issue is that only SVG elements can be downloaded which do not contain complete tree graphs because SVG gets overflow by its inner element "g". SVG has a inner group element "g" which is bigger than SVG's height and width, and it is dynamic (drag-able).</p>
  
  <p>This "g" element has a complete tree graph that I am not able to export as image or pdf.</p>
  
  <p>How do I export a complete graph?</p>