【问题标题】:How to convert a scanned PDF file to Editable PDF file with python?如何使用 python 将扫描的 PDF 文件转换为可编辑的 PDF 文件?
【发布时间】:2019-11-03 20:03:23
【问题描述】:

我只需要知道我们是否可以使用 python 将扫描的 pdf 文件转换为可编辑的 pdf 文件。我知道有几个图书馆,比如pytesseract, pyocr。在这方面的指导将不胜感激。谢谢

【问题讨论】:

    标签: python-3.x pdf-scraping


    【解决方案1】:
    import os
    import subprocess
    
    for top, dirs, files in os.walk('/my/pdf/folder'):
        for filename in files:
            if filename.endswith('.pdf'):
                abspath = os.path.join(top, filename)
                subprocess.call('lowriter --invisible --convert-to doc "{}"'
                                .format(abspath), shell=True)
    

    引用自here

    你应该先看再问。

    【讨论】:

      猜你喜欢
      • 2017-12-12
      • 2018-01-10
      • 1970-01-01
      • 1970-01-01
      • 2018-03-28
      • 2020-02-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多