title: Generating a PDF file from React Components
body: <p>I have been building a polling application. People are able to create their polls and get data regarding the question(s) they ask. I would like to add the functionality to let the users download the results in the form of a PDF.</p>
  
  <p>For example I have two components which are responsible for grabbing the question and data.</p>
  
  <pre><code>&lt;QuestionBox /&gt;
  &lt;ViewCharts /&gt;
  </code></pre>
  
  <p>I'm attempting to output both components into a PDF file. The user can then download this PFD file. I have found a few packages that permit the rendering of a PDF inside a component. However I failed to find one that can generate PDF from an input stream consisting of a virtual DOM. If I want to achieve this from scratch what approach should I follow ? </p>