title: How to convert JSON data to PDF using python script
body: <p>I want to convert JSON data to PDF which is getting from API.</p>
  
  <p>example <strong>JSON</strong> data</p>
  
  <pre><code>{
      "data": [
          {
              "state": "Manchester",
              "quantity": 20
          },
          {
              "state": "Surrey",
              "quantity": 46
          },
          {
              "state": "Scotland",
              "quantity": 36
          },
          {
              "state": "Kent",
              "quantity": 23
          },
          {
              "state": "Devon",
              "quantity": 43
          },
          {
              "state": "Glamorgan",
              "quantity": 43
          }
       ]   
  }
  </code></pre>
  
  <p>I found this script: 
      <a href="http://code.activestate.com/recipes/578979-convert-json-to-pdf-with-python-and-xtopdf/" rel="noreferrer">http://code.activestate.com/recipes/578979-convert-json-to-pdf-with-python-and-xtopdf/</a></p>
  
  <p>but getting <strong>error</strong> </p>
  
  <blockquote>
    <p>no module PDFWriter</p>
  </blockquote>
  
  <p>Is there any another way to convert JSON Data PDF.</p>
  
  <p>PLEASE HELP.</p>