code: def extract_pdftotext(self, filename, **kwargs):
          
          if 'layout' in kwargs:
              args = ['pdftotext', '-layout', filename, '-']
          else:
              args = ['pdftotext', filename, '-']
          stdout, _ = self.run(args)
          return stdout
docs: Extract text from pdfs using the pdftotext command line utility.