title: How can I adjust the 'word_margin' for reading PDFs with pdfminer in python?
body: <p>I've tried to manipulate the 'word_margin' with python using the following code but it throws me an error <code>TypeError: get_pages() got an unexpected keyword argument 'word_margin'</code>. PDFminer reads the document fine if I remove the <code>word_margin=word_margin</code>from the arguments. </p>
  
  <p>Code: </p>
  
  <pre><code>def convert_pdf_to_txt(path):
      rsrcmgr = PDFResourceManager()
      retstr = StringIO()
      codec = 'utf-8'
      laparams = LAParams()
      device = TextConverter(rsrcmgr, retstr, codec=codec, laparams=laparams)
      fp = open(path, 'rb')
      interpreter = PDFPageInterpreter(rsrcmgr, device)
      password = ""
      maxpages = 0
      caching = True
      pagenos=set()
      word_margin = 1
  
      for page in PDFPage.get_pages(fp, pagenos, word_margin=word_margin,maxpages=maxpages,password=password,caching=caching, check_extractable=True):
  
          interpreter.process_page(page)
  
      text = retstr.getvalue()
  
      fp.close()
      device.close()
      retstr.close()
      return text
  </code></pre>