title: How to fill PDF forms using Python
body: <p>I have a <code>PDF form</code> created using <code>Adobe LiveCycle Designer ES 10.4</code>. I need to fill it using <code>Python</code> so that we can reduce manual labor. I searched the web and read some article most of them were focused around <code>pdfrw</code> library, I tried using it and extracted some information from <code>PDF form</code> as shown below</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>from pdfrw import PdfReader
  pdf = PdfReader('sample.pdf')
  print(pdf.keys())
  print(pdf.Info)
  print(pdf.Root.keys())
  print('PDF has {} pages'.format(len(pdf.pages)))
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <pre><code>['/Root', '/Info', '/ID', '/Size']
  {'/CreationDate': "(D:20180822164509+05'30')", '/Creator': '(Adobe LiveCycle Designer ES 10.4)', '/ModDate': "(D:20180822165611+05'30')", '/Producer': '(Adobe XML Form Module Library)'}
  ['/AcroForm', '/MarkInfo', '/Metadata', '/Names', '/NeedsRendering', '/Pages', '/Perms', '/StructTreeRoot', '/Type']
  PDF has 1 pages
  </code></pre>
  
  <p>I am not sure how further I can use <code>pdfrw</code> to access the fillable fields from the PDF form and fill them using <code>Python</code> is it possible. Any suggestions would be helpful.</p>