使用 PDFminer 将 PDF 转换为 html

Gor*_*ven 5 python

我正在尝试使用 pdfminer 命令行工具将 pdf 文件转换为 html 文件,运行后

pdf2txt.py -o output.html -t html casino.pdf
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Traceback (most recent call last):
  File "/usr/local/bin/pdf2txt.py", line 101, in <module>
    if __name__ == '__main__': sys.exit(main(sys.argv))
  File "/usr/local/bin/pdf2txt.py", line 87, in main
    layoutmode=layoutmode, laparams=laparams, outdir=outdir)
TypeError: __init__() got an unexpected keyword argument 'outdir'
Run Code Online (Sandbox Code Playgroud)

我以前使用过这个库,它工作得很好,我真的很难理解发生了什么

这是库的链接http://www.unixuser.org/~euske/python/pdfminer/index.html

Gor*_*ven 2

删除并重新安装库后似乎可以正常工作